/*java jdk 1.7+
# -*- coding: utf-8 -
'''
Created on 2022年07月07日
@author: zxyong 13738196011
'''*/

package com.plugins.usereflect;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.URLEncoder;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.LinkedHashMap;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.zxy.business.Ope_DB_Cent;
import com.zxy.common.Com_Fun;
import com.zxy.common.Com_Para;
import com.zxy.db1.Db_Common1;

//一键生成表
public class A01_STATICDB3_IN implements com.zxy.common.ParamName_InterFace
{
	public StringBuilder	strResult		= new StringBuilder();
	public String			user_main_id			= null;
	public String			session_id		= null;
	public String			param_name		= "";
	// 子系统序号(t_db_config主键)
	public String			param_value1	= null;
	// model名称com.plugins.A01_9LK33T.t_test_db
	public String			param_value2	= null;
	// 中文名称
	public String			param_value3	= null;
	// PID_Column
	public String			param_value4	= null;
	// SQl语句或接口名称
	public String			param_value5	= null;
	public String			param_value6	= null;
	public String			param_value7	= null;
	public String			param_value8	= null;
	public String			param_value9	= null;
	// #默认0:jqgrid 1:bootstrapTable
	public String			param_value10	= null;
	public JSONArray		table_info		= null;

	private String			attRDA			= "";
	private String			attRBC			= "";
	private String			attTableName	= "";
	//按钮扩展表
	private JSONArray 		t_btn_expand = null;
	//字段扩展表
	private JSONObject		t_column_expand = new JSONObject(new LinkedHashMap());
	//元数据表扩展表
	private JSONObject		t_single_expand = new JSONObject(new LinkedHashMap());
	//查找框元数据扩展表
	private JSONObject		t_find_expand = new JSONObject(new LinkedHashMap());
	
	private JSONObject		temAtts			= new JSONObject(new LinkedHashMap());
	private JSONArray		temMainSub		= new JSONArray();
	private JSONObject		temQryAtt		= new JSONObject(new LinkedHashMap());
	private String			attFFD			= "biz_vue";

	public void init_start()
	{
		try
		{
			Ope_DB_Cent opc = new Ope_DB_Cent();
			this.attTableName = this.param_value2;
			if(!java.util.Objects.equals(this.param_value9.trim(),""))
				this.attFFD = this.param_value9;
			String temRandom = this.GetRandom(this.attTableName);
			if(temRandom.equals("XXXXXX"))
			{
				temRandom = Com_Fun.Get_New_GUID();
				this.attRDA = "A" + temRandom.substring(0,5);
				this.attRBC = "B" + temRandom.substring(0,5);
			}else
			{
				this.attRDA = "A" + temRandom.substring(1,6);
				this.attRBC = "B" + temRandom.substring(1,6);
			}
			this.init_att(this.attTableName);
			// #一键建表及接口操作
			this.strResult = opc.Create_Table3(this.param_value1,this.param_value2,this.param_value3,this.param_value4,this.table_info,this.t_single_expand);
			// #创建树型表查询函数mysql
			if(this.strResult.length() == 0){
				this.strResult = opc.Create_funnode(this.param_value1,this.param_value2,this.t_single_expand);
				this.strResult.delete(0,this.strResult.length());
			}
			// #一键建对应的下拉框及查找框数据接口
			if(this.strResult.length() == 0)
				this.strResult = opc.Create_StaticView_Interface(this.param_value1,this.param_value2,this.param_value3,this.param_value4,"N01",this.table_info);
			//#一键生成对应html及js
			if(this.strResult.length() == 0)
				this.strResult = this.Create_Web_Html_bootstrap();
			else{
				String error = Com_Fun.s_decode(this.strResult.toString(),Com_Para.U_CODE);
				this.strResult.delete(0,this.strResult.length());
				this.strResult.append(Com_Fun.get_ope_result(param_name,"0","创建业务设置失败:"+error));
			}
		}
		catch(Exception e)
		{
			Com_Fun.debug_in(e,this.toString());
			this.strResult.delete(0,this.strResult.length());
			this.strResult.append(Com_Fun.get_ope_result(param_name,"0","异常:"+e.getMessage()));
		}
		finally
		{
		}
	}

	//#删除元数据表相关文件
    public StringBuilder Delete_SingleTable_Py(String inputTableName,String file_folder){
		StringBuilder strResult = new StringBuilder();
    	String web_path = Com_Fun.GetHashTable(Com_Para.ht_T_PARAM_VALUE,"web_path");
    	if(java.util.Objects.equals(web_path,""))
    		web_path = Com_Para.ApplicationPath+"../../";
    	String templatePath = web_path+Com_Para.zxyPath+ "template";
    	String tempTargetPath = web_path+Com_Para.zxyPath+ file_folder+"/";
    	
        File temFile = null;
        try{
        	temFile = new File(tempTargetPath+inputTableName+".html");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        	temFile = new File(tempTargetPath+inputTableName+".vue");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        	temFile = new File(tempTargetPath+inputTableName+".js");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        	temFile = new File(tempTargetPath+inputTableName+"_$.html");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        	temFile = new File(tempTargetPath+inputTableName+"_$.vue");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        	temFile = new File(tempTargetPath+inputTableName+"_$.js");
        	if(temFile.exists())
    		{
        		temFile.delete();
    		}
        }
		catch(Exception e)
		{
			Com_Fun.debug_in(e,this.toString());
			this.strResult.delete(0,this.strResult.length());
			this.strResult.append(Com_Fun.get_ope_result(param_name,"0","异常:"+e.getMessage()));
		}
        return this.strResult;
    }
                
	//#创建业务web信息
    private StringBuilder Create_Web_Html_bootstrap() throws JSONException{
    	StringBuilder strResult = new StringBuilder();
    	String temTABLE_NAME = this.param_value2;
    	String web_path = Com_Fun.GetHashTable(Com_Para.ht_T_PARAM_VALUE,"web_path");
    	if(java.util.Objects.equals(web_path,""))
    		web_path = Com_Para.ApplicationPath+"../../";
    	String templatePath = web_path+Com_Para.zxyPath+ "template";
    	String tempTargetPath = web_path+Com_Para.zxyPath+ this.attFFD;
    	File file = new File(tempTargetPath);
		if(!file.exists() && !file.isDirectory())
		{
			file.mkdir();
		}
		strResult = this.WriteBizHtml_1(templatePath,tempTargetPath,temTABLE_NAME);
		if(strResult.length() == 0)
			strResult = this.WriteBizHtml_2(templatePath,tempTargetPath,temTABLE_NAME);
		if(strResult.length() == 0)
			strResult = this.WriteBizJs_1(templatePath,tempTargetPath,temTABLE_NAME);
		if(strResult.length() == 0)
			strResult = this.WriteBizJs_2(templatePath,tempTargetPath,temTABLE_NAME);
        return strResult;
    }
     
    //获取查找框元数据扩展表
    private void init_t_find_expand(String temCOLUMN_FIND_HTML,String key) throws JSONException{
    	String find_table_name = "";
    	if(temCOLUMN_FIND_HTML.lastIndexOf("/") != -1){
    		find_table_name = temCOLUMN_FIND_HTML.substring(temCOLUMN_FIND_HTML.lastIndexOf("/")+1,temCOLUMN_FIND_HTML.length()).replace(".vue","");
    	}
    	else{
    		find_table_name = temCOLUMN_FIND_HTML.replace(".vue","");
    	}
    	Ope_DB_Cent opc = new Ope_DB_Cent();
    	StringBuilder strSql = new StringBuilder();
    	strSql.delete(0,strSql.length());
		strSql.append("SELECT t_single_expand.*,'"+find_table_name+"' as 'TABLE_EN_NAME' from t_single_expand where TABLE_ID in "
				+ "(select MAIN_ID from t_single_table where TABLE_EN_NAME = '"+find_table_name+"' ) and IS_TREE = '1' and TREE_COND = '1'");
		JSONArray jsary = opc.SqlToJson(1,strSql.toString());
		if(jsary.length() > 0)
			this.t_find_expand.put(key,jsary.getJSONObject(0));
    }
    
    //#获取业务对象model相关信息
    private void init_att(String temTABLE_NAME) throws JSONException{
    	for(int i = 0; i < this.table_info.length(); i ++){
    		JSONObject jsoColumn = this.table_info.getJSONObject(i);
    		String key = jsoColumn.getString("COLUMN_EN_NAME");
        	this.temAtts.put(key,jsoColumn);
    		//是否查询条件
    		if(!java.util.Objects.equals(jsoColumn.getString("COLUMN_QRY"),"0")){
    			this.temQryAtt.put(jsoColumn.getString("COLUMN_EN_NAME"),jsoColumn);
    		}
    		if(!java.util.Objects.equals(jsoColumn.getString("COLUMN_FIND_HTML"),"")){
    			init_t_find_expand(jsoColumn.getString("COLUMN_FIND_HTML"),key);
    		}
    	}
    	Ope_DB_Cent opc = new Ope_DB_Cent();
    	StringBuilder strSql = new StringBuilder();
    	strSql.delete(0,strSql.length());
		strSql.append("SELECT * FROM t_btn_expand where TABLE_ID in "
				+ "(select MAIN_ID from t_single_table where DB_ID = '"+this.param_value1
				+"' and TABLE_EN_NAME = '"+temTABLE_NAME+"') order by S_SORT,MAIN_ID asc");
		this.t_btn_expand = opc.SqlToJson(1,strSql.toString());
		
		strSql.delete(0,strSql.length());
		strSql.append("SELECT a.*,b.COLUMN_EN_NAME FROM t_column_expand a join "
				+"t_table_column b on a.COLUMN_ID = b.MAIN_ID where b.TABLE_ID in "
				+ "(select MAIN_ID from t_single_table where DB_ID = '"+this.param_value1
				+"' and TABLE_EN_NAME = '"+temTABLE_NAME+"')");
		JSONArray jsary = opc.SqlToJson(1,strSql.toString());
		for(int i = 0; i < jsary.length(); i ++){
    		JSONObject jsoColumn = jsary.getJSONObject(i);
    		String key = jsoColumn.getString("COLUMN_EN_NAME");
        	this.t_column_expand.put(key,jsoColumn);
    	}
		
		strSql.delete(0,strSql.length());
		strSql.append("SELECT * from t_single_expand where TABLE_ID in "
				+ "(select MAIN_ID from t_single_table where DB_ID = '"+this.param_value1
				+"' and TABLE_EN_NAME = '"+temTABLE_NAME+"')");
		jsary = opc.SqlToJson(1,strSql.toString());
		if(jsary.length() > 0)
			this.t_single_expand = jsary.getJSONObject(0);
		
        this.temMainSub = opc.GetMainSubInfo(temTABLE_NAME,this.attFFD);
    }		
    
    //#生成业务js
    private StringBuilder WriteBizJs_1(String templatePath,String tempTargetPath,String temTABLE_NAME){
    	StringBuilder strResult = new StringBuilder();
		FileInputStream fr = null;
		InputStreamReader is = null;
		BufferedReader br = null;
		PrintWriter sw = null;
		File readFile = null;
		File writeFile = null;           
        try{
			String tempN = "template_table3.js";
			if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1"))
				tempN = "template_table3_tree.js";
			
        	readFile = new File(templatePath+Com_Para.zxyPath+tempN);
			if(!readFile.exists())
			{
				strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode(tempN+"模板文件不存在")+ "\"}]}");
				return strResult;
			}
			writeFile = new File(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+".js");
			if(writeFile.exists())
			{
                strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode(temTABLE_NAME+".js文件已存在")+ "\"}]}");
                return strResult;
			}
			fr = new FileInputStream(templatePath+Com_Para.zxyPath+tempN);
			is = new InputStreamReader(fr,Com_Para.U_CODE);
			br = new BufferedReader(is);
			sw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+".js",true),Com_Para.U_CODE)));
			int k = 0;
			while(true){
				String temLines = br.readLine();
				if(java.util.Objects.equals(temLines,null))
					break;
                if(!java.util.Objects.equals(this.param_value3,""))
                    temLines = temLines.replace("{template_table_CN}",this.param_value3).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC).replace("{$FFD$}",this.attFFD);                   
                temLines = temLines.replace("{template_table_EN}",temTABLE_NAME).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC).replace("{$FFD$}",this.attFFD);
                //#整行读取数据
                if(k != 0)
                	sw.write("\r\n");
                k ++;
                sw.write(temLines);
                if(temLines.indexOf("*declare select options begin*") != -1){
                	sw.write(this.AppenDSOB());
                }
                else if(temLines.indexOf("*refresh select options begin*") != -1){                	
                	sw.write(this.AppenRSOB());
                }
                else if(temLines.indexOf("*biz begin*") != -1){
                	sw.write(this.AppenBB(temTABLE_NAME));                    
                }
                else if(temLines.indexOf("*biz step begin*") != -1){
                	sw.write(this.AppenBSB(temTABLE_NAME));
                }
				else if(temLines.indexOf("*declare query param begin*") != -1){
                    sw.write(this.AppenDQPB1());
                }
				else if(temLines.indexOf("*find qry fun begin*") != -1){
                    sw.write(this.AppenFQFB());
                }
				else if(temLines.indexOf("*table column begin*") != -1){
                    sw.write(this.AppendColumn());
                }
				else if(temLines.indexOf("*query conditions init begin*") != -1){
                    sw.write(this.AppenQCIB());
                }
				else if(temLines.indexOf("*get query param begin*") != -1){
                    sw.write(this.AppenGQPB());
                }
				else if(temLines.indexOf("*set query param begin*") != -1){
                    sw.write(this.AppenSQPB());
                }
				else if(temLines.indexOf("*add param value begin*") != -1){
                    sw.write(this.AppenAPVB());
                }
				else if(temLines.indexOf("*get find subvue bgein*") != -1){
                    sw.write(this.AppenGFSB());
                }
				else if(temLines.indexOf("*refresh query param begin*") != -1){
                    sw.write(this.AppenRQPB());
                }
				else if(temLines.indexOf("*Send One FindSelect param bgein*") != -1){
                    sw.write(this.AppenSOFPB());
                }
				else if(temLines.indexOf("*Send Two FindSelect param bgein*") != -1){
                    sw.write(this.AppenSTFPB());
                }
				else if(temLines.indexOf("*get tab subvue begin*") != -1){
                    sw.write(this.AppenGTSB());
                }
				else if(temLines.indexOf("*Tab Click Fun Begin*") != -1){
                    sw.write(this.AppenTCFB());
                }
				else if(temLines.indexOf("*Main Subsuv Table Param Begin*") != -1){
                    sw.write(this.AppenMSTPB());
                }
				else if(temLines.indexOf("*Main Subsuv Find Button Begin*") != -1){
                    sw.write(this.AppenMSFBB());
                }
				else if(temLines.indexOf("*table button defined begin*") != -1){
					sw.write(this.AppenTBDB());
				}
				else if(temLines.indexOf("*table button events begin*") != -1){
					sw.write(this.AppenTBEB());
				}
				else if(temLines.indexOf("*open new page begin*") != -1){
					sw.write(this.AppenONPB());
				}
				else if(temLines.indexOf("*tree function defined begin*") != -1){
					sw.write(this.AppenTFDB());
				}
				else if(temLines.indexOf("*tree function run begin*") != -1){
					sw.write(this.AppenTFRB());
				}
			}
        }
        catch(Exception e)
        {
            strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("异常信息"+e.getMessage())+ "\"}]}");
			Com_Fun.debug_in(e,this.toString());
        }
        finally
        {
            try
            {
            	if(!java.util.Objects.equals(is,null))
            		is.close();
            	if(!java.util.Objects.equals(br,null))
            		br.close();
            	if(!java.util.Objects.equals(fr,null))
            		fr.close();
            	if(!java.util.Objects.equals(sw,null))
            		sw.close();
            }
            catch(Exception ex)
            {
            }
        }
        return strResult;
	}
    
    //生成业务js
    private StringBuilder WriteBizJs_2(String templatePath,String tempTargetPath,String temTABLE_NAME){
    	StringBuilder strResult = new StringBuilder();
		FileInputStream fr = null;
		InputStreamReader is = null;
		BufferedReader br = null;
//		FileWriter sw = null;  
		PrintWriter sw = null;
		File readFile = null;
		File writeFile = null;           
        try{
        	
        	readFile = new File(templatePath+Com_Para.zxyPath+"template_table3_$.js");
			if(!readFile.exists())
			{
				strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("template_table3.js模板文件不存在")+ "\"}]}");
				return strResult;
			}
			writeFile = new File(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.js");
			if(writeFile.exists())
			{
                strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode(temTABLE_NAME+".js文件已存在")+ "\"}]}");
                return strResult;
			}
			fr = new FileInputStream(templatePath+Com_Para.zxyPath+"template_table3_$.js");
			is = new InputStreamReader(fr,Com_Para.U_CODE);
			br = new BufferedReader(is);
//			sw = new FileWriter(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.js",true);
			sw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.js",true),Com_Para.U_CODE)));
			int k = 0;
			while(true){
				String temLines = br.readLine();
				if(java.util.Objects.equals(temLines,null))
					break;
				if(!java.util.Objects.equals(this.param_value3,""))
                    temLines = temLines.replace("{template_table_CN}",this.param_value3).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC).replace("{$FFD$}",this.attFFD);
                temLines = temLines.replace("{template_table_EN}",temTABLE_NAME).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC).replace("{$FFD$}",this.attFFD);
                //#整行读取数据
                if(k != 0)
                	sw.write("\r\n");
                k ++;
                sw.write(temLines);              
                if(temLines.indexOf("*declare select options begin*") != -1){
                	sw.write(this.AppenDSOB2());
                }
                else if(temLines.indexOf("*biz begin*") != -1){
                    sw.write(this.AppenBB2(temTABLE_NAME));
                }
                else if(temLines.indexOf("*biz step begin*") != -1){
                	sw.write(this.AppenBSB2(temTABLE_NAME));                	
                }
                else if(temLines.indexOf("*form datetime init begin*") != -1){
                    sw.write(this.AppenFDIB());
                }
                else if(temLines.indexOf("*insert param begin*") != -1){
                    sw.write(this.AppendIPB());
                }
                else if(temLines.indexOf("*update param begin*") != -1){
                    sw.write(this.AppendUPB());
                }
                else if(temLines.indexOf("*input check rules begin*") != -1){
                    sw.write(this.AppendICRB());
                }
                else if(temLines.indexOf("*input check messages begin*") != -1){
                    sw.write(this.AppendICMB());
                }
                else if(temLines.indexOf("*find qry fun begin*") != -1){
                    sw.write(this.AppenFQFB2());
                }
                else if(temLines.indexOf("*input validate clear begin*") != -1){
                    sw.write(this.AppenIVCB());
                }
                else if(temLines.indexOf("*get find subvue bgein*") != -1){
                    sw.write(this.AppenGFSB2());
                }
                else if(temLines.indexOf("*Get Find Select param bgein*") != -1){
                    sw.write(this.AppenGFSPB2());
                }
                else if(temLines.indexOf("*Main Subsuv Table Param Begin*") != -1){
                    sw.write(this.AppenMSTPB2());
                }
                else if(temLines.indexOf("*Main Subsuv Find Button Begin2*") != -1){
                    sw.write(this.AppenMSFBB2());
                }
                else if(temLines.indexOf("*tree pid set value begin*") != -1){
                	sw.write(this.AppenTPSVB2());
                }
                else if(temLines.indexOf("*Input Default Begin*") != -1){
                	sw.write(this.AppenIDB2());
                }
            }
        }
	    catch(Exception ex)
	    {
	        strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("异常信息"+ex.getMessage())+ "\"}]}");
	        ex.printStackTrace();
	    }
	    finally
	    {
	        try
	        {
	        	if(!java.util.Objects.equals(is,null))
	        		is.close();
	           	if(!java.util.Objects.equals(br,null))
	           		br.close();
	           	if(!java.util.Objects.equals(fr,null))
	           		fr.close();
	           	if(!java.util.Objects.equals(sw,null))
	           		sw.close();
	           }
	           catch(Exception ex)
	           {
	           }
	    }
	    return strResult;
    }
    
    /*biz step begin*/
    private String AppenBSB(String temTABLE_NAME) throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
    	//format函数方式开始
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	if(!java.util.Objects.equals(jsoColumn.getString("COLUMN_QRY_FORMAT"),"")){
	        	temResult += "\r\nfunction "+this.attRDA+"_format_"+key+"(value, row, index) {";
	        	temResult += "\r\n    var objResult = s_decode(value);";
	        	temResult += "\r\n    for(i = 0; i < "+this.attRDA+"_ary_"+key+".length; i++) {";
	        	temResult += "\r\n        var obj = "+this.attRDA+"_ary_"+key+"[i];";
	        	if(this.t_find_expand.length() > 0 && this.t_find_expand.has(key)){
	        		temResult += "\r\n        if (obj[GetLowUpp(\""+this.t_find_expand.getJSONObject(key).getString("C_NODE")+"\")].toString() == value.toString()) {";
		        	temResult += "\r\n            objResult = s_decode(obj[GetLowUpp(\"cn_name\")]);";
	        	}
	        	else{
		        	temResult += "\r\n        if (obj[GetLowUpp(\"main_id\")].toString() == value.toString()) {";
		        	temResult += "\r\n            objResult = s_decode(obj[GetLowUpp(\"cn_name\")]);";
	        	}
	        	temResult += "\r\n            break;";
	        	temResult += "\r\n        }";
	        	temResult += "\r\n    }";
	        	temResult += "\r\n    return objResult;";
	        	temResult += "\r\n}";
	        	temResult += "\r\n";
        	}
        }
        //format函数方式结束
        
    	/*这里些循环目前只有Select或Find,读取数据接口并绑定页面对象逻辑*/
        iter1 = this.temAtts.keys();
        boolean bINF_EN = false;
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	
        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"") && this.t_find_expand.has(key)){
    			JSONObject jsofindexpand = this.t_find_expand.getJSONObject(key);
        		String temTB_EN_NAME = jsofindexpand.getString("TABLE_EN_NAME");
        		if(bINF_EN){
	        		temResult += "\r\n    var inputdata = {";
	                temResult += "\r\n        \"param_name\": \"N01_sel_"+temTB_EN_NAME+"_ByNodeID\",";
	                temResult += "\r\n        \"session_id\": session_id,";
	                temResult += "\r\n        \"login_id\": login_id";
	                temResult += "\r\n        ,\"param_value1\":\"\"";
	                temResult += "\r\n    };";
	                temResult += "\r\n    ly_index = layer.load();";
	                temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_N01_sel_"+temTB_EN_NAME+"_ByNodeID\");";                                                            
	            	temResult += "\r\n}";
	                temResult += "\r\n";
        		}
        		temResult += "\r\nfunction "+this.attRDA+"_get_N01_sel_"+temTB_EN_NAME+"_ByNodeID(input) {";
                temResult += "\r\n    layer.close(ly_index);";
                temResult += "\r\n    //查询失败";
                temResult += "\r\n    if (Call_QryResult(input.N01_sel_"+temTB_EN_NAME+"_ByNodeID) == false)";
                temResult += "\r\n        return false;";
                temResult += "\r\n    "+this.attRDA+"_ary_"+key+" = JSONkeyReplace(input.N01_sel_"+temTB_EN_NAME+"_ByNodeID,\""+jsofindexpand.getString("S_NAME")+"\",\"CN_NAME\");";
                temResult += "\r\n    \r\n";
                temResult += "\r\n    //树形结构函数调用";
                temResult += "\r\n    /*tree function run begin*/";
                temResult += "\r\n    input.N01_sel_"+temTB_EN_NAME+"_ByNodeID = "+this.attRDA+"_Bind_Tree(input.N01_sel_"+temTB_EN_NAME+"_ByNodeID);";
                temResult += "\r\n    /*tree function run end*/";
                bINF_EN = true;
        	}
        	//下拉框select语句
        	else if(COLUMN_QRY_FORMAT.toUpperCase().indexOf("SELECT ") == 0){
        		if(bINF_EN){
	            	temResult += "\r\n    var inputdata = {";
	            	temResult += "\r\n        \"param_name\": \"N01_"+temTABLE_NAME+"$"+key+"\",";
	            	temResult += "\r\n        \"session_id\": session_id,";
	            	temResult += "\r\n        \"login_id\": login_id";
	            	temResult += "\r\n    };";
	            	temResult += "\r\n    ly_index = layer.load();";
	            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_N01_"+temTABLE_NAME+"$"+key+"\");";
	            	temResult += "\r\n}";
	                temResult += "\r\n";
        		}
                temResult += "\r\nfunction "+this.attRDA+"_get_N01_"+temTABLE_NAME+"$"+key+"(input) {";
                temResult += "\r\n    layer.close(ly_index);";
                temResult += "\r\n    //查询失败";
                temResult += "\r\n    if (Call_QryResult(input.N01_"+temTABLE_NAME+"$"+key+") == false)";
                temResult += "\r\n        return false;";
                temResult += "\r\n    "+this.attRDA+"_ary_"+key+" = input.N01_"+temTABLE_NAME+"$"+key+";"; 
                if(java.util.Objects.equals(COLUMN_QRY,"2")){
	        		String sel_type = "";
	                if(!java.util.Objects.equals(COLUMN_FIND_RETURN,""))
	                	sel_type = "find_";
	                else
	                	sel_type = "qry_";
	                temResult += "\r\n    if($(\"#"+this.attRDA+"_"+sel_type+key+"\").is(\"select\") && $(\"#"+this.attRDA+"_"+sel_type+key+"\")[0].options.length == 0)";
	                temResult += "\r\n    {";
	                temResult += "\r\n        $.each("+this.attRDA+"_ary_"+key+", function (i, obj) {";
	                temResult += "\r\n            addOptionValue(\""+this.attRDA+"_"+sel_type+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
	                temResult += "\r\n        });";
	                temResult += "\r\n    }";
                }
                bINF_EN = true;
        	}
        	//下拉框接口调用
        	else if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
        		boolean bIsList = true;
        		try{
                	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
                }
                catch(Exception ss){
                	bIsList = false;
                }
        		if(!bIsList){
	        		if(bINF_EN){
		            	temResult += "\r\n    var inputdata = {";
		            	temResult += "\r\n        \"param_name\": \""+COLUMN_QRY_FORMAT+"\",";
		            	temResult += "\r\n        \"session_id\": session_id,";
		            	temResult += "\r\n        \"login_id\": login_id";
		            	temResult += "\r\n    };";
		            	temResult += "\r\n    ly_index = layer.load();";
		            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_"+COLUMN_QRY_FORMAT+"\");";
		            	temResult += "\r\n}";
		                temResult += "\r\n";
	        		}
	                temResult += "\r\nfunction "+this.attRDA+"_get_"+COLUMN_QRY_FORMAT+"(input) {";
	                temResult += "\r\n    layer.close(ly_index);";
	                temResult += "\r\n    //查询失败";
	                temResult += "\r\n    if (Call_QryResult(input."+COLUMN_QRY_FORMAT+") == false)";
	                temResult += "\r\n        return false;";
	                temResult += "\r\n    "+this.attRDA+"_ary_"+key+" = input."+COLUMN_QRY_FORMAT+";"; 
	                if(java.util.Objects.equals(COLUMN_QRY,"2")){
		        		String sel_type = "";
		                if(!java.util.Objects.equals(COLUMN_FIND_RETURN,""))
		                	sel_type = "find_";
		                else
		                	sel_type = "qry_";
		                temResult += "\r\n    if($(\"#"+this.attRDA+"_"+sel_type+key+"\").is(\"select\") && $(\"#"+this.attRDA+"_"+sel_type+key+"\")[0].options.length == 0)";
		                temResult += "\r\n    {";
		                temResult += "\r\n        $.each("+this.attRDA+"_ary_"+key+", function (i, obj) {";
		                temResult += "\r\n            addOptionValue(\""+this.attRDA+"_"+sel_type+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
		                temResult += "\r\n        });";
		                temResult += "\r\n    }";
	                }
	                bINF_EN = true;
        		}
        	}        	
        	else if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
        		if(bINF_EN){
	            	temResult += "\r\n    var inputdata = {";
	            	temResult += "\r\n        \"param_name\": \""+COLUMN_QRY_FORMAT+"\",";
	            	temResult += "\r\n        \"session_id\": session_id,";
	            	temResult += "\r\n        \"login_id\": login_id";
	            	temResult += "\r\n    };";
	            	temResult += "\r\n    ly_index = layer.load();";
	            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_"+COLUMN_QRY_FORMAT+"\");";
	            	temResult += "\r\n}";
	                temResult += "\r\n";
        		}
                temResult += "\r\nfunction "+this.attRDA+"_get_"+COLUMN_QRY_FORMAT+"(input) {";
                temResult += "\r\n    layer.close(ly_index);";
                temResult += "\r\n    //查询失败";
                temResult += "\r\n    if (Call_QryResult(input."+COLUMN_QRY_FORMAT+") == false)";
                temResult += "\r\n        return false;";
                temResult += "\r\n    "+this.attRDA+"_ary_"+key+" = input."+COLUMN_QRY_FORMAT+";";  
                if(java.util.Objects.equals(COLUMN_QRY,"1")){
	                String sel_type = "";
	                if(!java.util.Objects.equals(COLUMN_FIND_HTML,""))
	                	sel_type = "find_";
	                else
	                	sel_type = "qry_";
	                temResult += "\r\n    if($(\"#"+this.attRDA+"_"+key+"\").is(\"select\") && $(\"#"+this.attRDA+"_"+key+"\")[0].options.length == 0)";
	                temResult += "\r\n    {";
	                temResult += "\r\n        $.each("+this.attRDA+"_ary_"+key+", function (i, obj) {";
	                temResult += "\r\n            addOptionValue(\""+this.attRDA+"_"+sel_type+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
	                temResult += "\r\n        });";
	                temResult += "\r\n    }";
                }
                bINF_EN = true;
        	}
        }
        if(bINF_EN){
	        iter1 = this.temAtts.keys();
	        while (iter1.hasNext()){
	        	String key = (String) iter1.next();  
	        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
	        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
	        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
	        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
	        	boolean bIsList = true;
	        	try{
                	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
                }
                catch(Exception ss){
                	bIsList = false;
                }
	        	if(bIsList){
	        		String sel_type = "";
	                if(!java.util.Objects.equals(COLUMN_FIND_RETURN,""))
	                	sel_type = "find_";
	                else
	                	sel_type = "qry_";
	        		 temResult += "\r\n";
	        		 temResult += "\r\n    if($(\"#"+this.attRDA+"_"+key+"\").is(\"select\") && $(\"#"+this.attRDA+"_"+key+"\")[0].options.length == 0)";
		             temResult += "\r\n    {";
		             temResult += "\r\n        $.each("+this.attRDA+"_ary_"+key+", function (i, obj) {";
		             temResult += "\r\n            addOptionValue(\""+this.attRDA+"_"+sel_type+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
		             temResult += "\r\n        });";
		             temResult += "\r\n    }";
	        	}
	        }
	        temResult += "\r\n    "+this.attRDA+"_init_"+temTABLE_NAME+"();";
	        temResult += "\r\n}";
        }
        return temResult;
    }
    
    /*biz step begin*/
    private String AppenBSB2(String temTABLE_NAME) throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
    	//format函数方式开始
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	if(!java.util.Objects.equals(jsoColumn.getString("COLUMN_QRY_FORMAT"),"")){
	        	temResult += "\r\nfunction "+this.attRBC+"_format_"+key+"(value, row, index) {";
	        	temResult += "\r\n    var objResult = s_decode(value);";
	        	temResult += "\r\n    for(i = 0; i < "+this.attRBC+"_ary_"+key+".length; i++) {";
	        	temResult += "\r\n        var obj = "+this.attRBC+"_ary_"+key+"[i];";
	        	temResult += "\r\n        if (obj[GetLowUpp(\"main_id\")].toString() == value.toString()) {";
	        	temResult += "\r\n            objResult = s_decode(obj[GetLowUpp(\"cn_name\")]);";
	        	temResult += "\r\n            break;";
	        	temResult += "\r\n        }";
	        	temResult += "\r\n    }";
	        	temResult += "\r\n    return objResult;";
	        	temResult += "\r\n}";
	        	temResult += "\r\n";
        	}
        }
        //format函数方式结束
        
    	/*这里些循环目前只有Select或Find,读取数据接口并绑定页面对象逻辑*/
        iter1 = this.temAtts.keys();
        boolean bINF_EN = false;
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	if(COLUMN_QRY_FORMAT.toUpperCase().indexOf("SELECT ") == 0){
        		if(bINF_EN){
	            	temResult += "\r\n    var inputdata = {";
	            	temResult += "\r\n        \"param_name\": \"N01_"+temTABLE_NAME+"$"+key+"\",";
	            	temResult += "\r\n        \"session_id\": session_id,";
	            	temResult += "\r\n        \"login_id\": login_id";
	            	temResult += "\r\n    };";
	            	temResult += "\r\n    ly_index = layer.load();";
	            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRBC+"_get_N01_"+temTABLE_NAME+"$"+key+"\");";
	            	temResult += "\r\n}";
	                temResult += "\r\n";
        		}
                temResult += "\r\nfunction "+this.attRBC+"_get_N01_"+temTABLE_NAME+"$"+key+"(input) {";
                temResult += "\r\n    layer.close(ly_index);";
                temResult += "\r\n    //查询失败";
                temResult += "\r\n    if (Call_QryResult(input.N01_"+temTABLE_NAME+"$"+key+") == false)";
                temResult += "\r\n        return false;";
                temResult += "\r\n    "+this.attRBC+"_ary_"+key+" = input.N01_"+temTABLE_NAME+"$"+key+";";         
                if(java.util.Objects.equals(COLUMN_QRY,"1")){
	                temResult += "\r\n    if($(\"#"+this.attRBC+"_"+key+"\").is(\"select\") && $(\"#"+this.attRBC+"_"+key+"\")[0].options.length == 0)";
	                temResult += "\r\n    {";
	                temResult += "\r\n        $.each("+this.attRBC+"_ary_"+key+", function (i, obj) {";
	                temResult += "\r\n            addOptionValue(\""+this.attRBC+"_"+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
	                temResult += "\r\n        });";
	                temResult += "\r\n    }";
                }
                bINF_EN = true;
        	}
        	else if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
        		if(bINF_EN){
	            	temResult += "\r\n    var inputdata = {";
	            	temResult += "\r\n        \"param_name\": \""+COLUMN_QRY_FORMAT+"\",";
	            	temResult += "\r\n        \"session_id\": session_id,";
	            	temResult += "\r\n        \"login_id\": login_id";
	            	temResult += "\r\n    };";
	            	temResult += "\r\n    ly_index = layer.load();";
	            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRBC+"_get_"+COLUMN_QRY_FORMAT+"\");";
	            	temResult += "\r\n}";
	                temResult += "\r\n";
        		}
                temResult += "\r\nfunction "+this.attRBC+"_get_"+COLUMN_QRY_FORMAT+"(input) {";
                temResult += "\r\n    layer.close(ly_index);";
                temResult += "\r\n    //查询失败";
                temResult += "\r\n    if (Call_QryResult(input."+COLUMN_QRY_FORMAT+") == false)";
                temResult += "\r\n        return false;";
                temResult += "\r\n    "+this.attRBC+"_ary_"+key+" = input."+COLUMN_QRY_FORMAT+";";         
                if(java.util.Objects.equals(COLUMN_QRY,"1")){
	                temResult += "\r\n    if($(\"#"+this.attRBC+"_"+key+"\").is(\"select\") && $(\"#"+this.attRBC+"_"+key+"\")[0].options.length == 0)";
	                temResult += "\r\n    {";
	                temResult += "\r\n        $.each("+this.attRBC+"_ary_"+key+", function (i, obj) {";
	                temResult += "\r\n            addOptionValue(\""+this.attRBC+"_"+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
	                temResult += "\r\n        });";
	                temResult += "\r\n    }";
                }
                bINF_EN = true;
        	}
        }
        if(bINF_EN){
	        iter1 = this.temAtts.keys();
	        while (iter1.hasNext()){
	        	String key = (String) iter1.next();  
	        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
	        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
	        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
	        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
	        	boolean bIsList = true;
	        	try{
                	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
                }
                catch(Exception ss){
                	bIsList = false;
                }
	        	if(bIsList){
	        		 temResult += "\r\n";
	        		 temResult += "\r\n    if($(\"#"+this.attRBC+"_"+key+"\").is(\"select\") && $(\"#"+this.attRBC+"_"+key+"\")[0].options.length == 0)";
		             temResult += "\r\n    {";
		             temResult += "\r\n        $.each("+this.attRBC+"_ary_"+key+", function (i, obj) {";
		             temResult += "\r\n            addOptionValue(\""+this.attRBC+"_"+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
		             temResult += "\r\n        });";
		             temResult += "\r\n    }";
	        	}
	        }
	        temResult += "\r\n    "+this.attRBC+"_init_"+temTABLE_NAME+"();";
	        temResult += "\r\n}";
        }
        return temResult;
    }
    
    //业务逻辑数据开始
    /*biz begin*/
    private String AppenBB(String temTABLE_NAME) throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        boolean bINF_EN = false;
    	//format函数方式开始
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"") && this.t_find_expand.has(key)){
        		JSONObject jsofindexpand = this.t_find_expand.getJSONObject(key);
        		String temTB_EN_NAME = jsofindexpand.getString("TABLE_EN_NAME");
        		temResult += "\r\n    var inputdata = {";
                temResult += "\r\n        \"param_name\": \"N01_sel_"+temTB_EN_NAME+"_ByNodeID\",";
                temResult += "\r\n        \"session_id\": session_id,";
                temResult += "\r\n        \"login_id\": login_id";
                temResult += "\r\n        ,\"param_value1\":\"\"";
                temResult += "\r\n    };";
                temResult += "\r\n    ly_index = layer.load();";
                temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_N01_sel_"+temTB_EN_NAME+"_ByNodeID\");";                                                            
            	bINF_EN = true;
                break;
        	}
        	else if(COLUMN_QRY_FORMAT.toUpperCase().indexOf("SELECT ") == 0)
        	{
        		temResult += "\r\n    var inputdata = {";
                temResult += "\r\n        \"param_name\": \"N01_"+temTABLE_NAME+"$"+key+"\",";
                temResult += "\r\n        \"session_id\": session_id,";
                temResult += "\r\n        \"login_id\": login_id";
                temResult += "\r\n    };";
                temResult += "\r\n    ly_index = layer.load();";
                temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_N01_"+temTABLE_NAME+"$"+key+"\");";                                                            
                bINF_EN = true;
                break;
        	}
        	else if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
            	temResult += "\r\n    var inputdata = {";
            	temResult += "\r\n        \"param_name\": \""+COLUMN_QRY_FORMAT+"\",";
            	temResult += "\r\n        \"session_id\": session_id,";
            	temResult += "\r\n        \"login_id\": login_id";
            	temResult += "\r\n    };";
            	temResult += "\r\n    ly_index = layer.load();";
            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_"+COLUMN_QRY_FORMAT+"\");";  
            	bINF_EN = true;
                break;
        	}
        }
        
    	if(!bINF_EN){
    		iter1 = this.temAtts.keys();
  	        while (iter1.hasNext()){
  	        	String key = (String) iter1.next();  
  	        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
  	        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
  	        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
  	        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
  	        	boolean bIsList = true;
  	        	try{
                  	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
                }
                catch(Exception ss){
                  	bIsList = false;
                }
  	        	String sel_type = "";
  	        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,""))
  	        		sel_type = "find_";
  	        	else
  	        		sel_type = "qry_";
  	        		
  	        	if(bIsList){
                	temResult += "\r\n    $.each("+this.attRDA+"_ary_"+key+", function (i, obj) {";
                	temResult += "\r\n        addOptionValue(\""+this.attRDA+"_"+sel_type+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
                	temResult += "\r\n    });";
  	        	}
  	        }
    		temResult += "\r\n    "+this.attRDA+"_init_"+temTABLE_NAME+"()";
        }
    	return temResult;
    }
    
    //业务逻辑数据开始
    /*biz begin*/
    private String AppenBB2(String temTABLE_NAME) throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        boolean bINF_EN = false;
    	//format函数方式开始
        while (iter1.hasNext()){
        	String key = (String) iter1.next();  
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	if(COLUMN_QRY_FORMAT.toUpperCase().indexOf("SELECT ") == 0)
        	{
        		temResult += "\r\n    var inputdata = {";
                temResult += "\r\n        \"param_name\": \"N01_"+temTABLE_NAME+"$"+key+"\",";
                temResult += "\r\n        \"session_id\": session_id,";
                temResult += "\r\n        \"login_id\": login_id";
                temResult += "\r\n    };";
                temResult += "\r\n    ly_index = layer.load();";
                temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRBC+"_get_N01_"+temTABLE_NAME+"$"+key+"\");";                                                            
        		bINF_EN = true;
                break;
        	}
        	else if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
            	temResult += "\r\n    var inputdata = {";
            	temResult += "\r\n        \"param_name\": \""+COLUMN_QRY_FORMAT+"\",";
            	temResult += "\r\n        \"session_id\": session_id,";
            	temResult += "\r\n        \"login_id\": login_id";
            	temResult += "\r\n    };";
            	temResult += "\r\n    ly_index = layer.load();";
            	temResult += "\r\n    get_ajax_baseurl(inputdata, \""+this.attRBC+"_get_"+COLUMN_QRY_FORMAT+"\");";  
            	bINF_EN = true;
                break;
        	}
        }
        
    	if(!bINF_EN){
    		iter1 = this.temAtts.keys();
  	        while (iter1.hasNext()){
  	        	String key = (String) iter1.next();  
  	        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
  	        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
  	        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
  	        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
  	        	boolean bIsList = true;
  	        	try{
                  	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
                  }
                  catch(Exception ss){
                  	bIsList = false;
                  }
  	        	if(bIsList){
                	temResult += "\r\n    $.each("+this.attRBC+"_ary_"+key+", function (i, obj) {";
                	temResult += "\r\n        addOptionValue(\""+this.attRBC+"_"+key+"\", obj[GetLowUpp(\"main_id\")], s_decode(obj[GetLowUpp(\"cn_name\")]));";
                	temResult += "\r\n    });";
  	        	}
  	        }
    		temResult += "\r\n    "+this.attRBC+"_init_"+temTABLE_NAME+"()";
        }
    	return temResult;
    }
    
    /*重置下拉框集合定义*/
    /*refresh select options begin*/
    private String AppenRSOB() throws JSONException{
    	String temResult = "";
//    	Iterator iter1 = this.temFindAtt.keys();
//        while (iter1.hasNext()){
//        	String key = (String) iter1.next();
//        	temResult += "\r\n    $(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val(\"\");";
//        	temResult += "\r\n    $(\"#"+this.attRDA+"_find_"+key+"\").val(\"-1\");";
//        }
        return temResult;
    }
    
    /*定义下拉框集合定义*/
    /*declare select options begin*/
    private String AppenDSOB() throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
	            boolean bIsList = true;
	            try{
	            	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
	            }
	            catch(Exception ss){
	            	bIsList = false;
	            }
	            if(!bIsList){
	            	temResult += "\r\nvar "+this.attRDA+"_ary_"+key+" = null;";
	            }
	            else if(bIsList){
	            	temResult += "\r\nvar "+this.attRDA+"_ary_"+key+" = "+COLUMN_QRY_FORMAT+";";
	            }
        	}
        }
        return temResult;
    }
    
    /*定义下拉框集合定义*/
    /*declare select options begin*/
    private String AppenDSOB2() throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
	            boolean bIsList = true;
	            try{
	            	JSONArray jsoJD = new JSONArray(COLUMN_QRY_FORMAT);
	            }
	            catch(Exception ss){
	            	bIsList = false;
	            }
	            if(!bIsList){
	            	temResult += "\r\nvar "+this.attRBC+"_ary_"+key+" = null;";
	            }
	            else if(bIsList){
	            	temResult += "\r\nvar "+this.attRBC+"_ary_"+key+" = "+COLUMN_QRY_FORMAT+";";
	            }
        	}
        }
        return temResult;
    }
    
    //所有编辑框默认值
    /*Input Default Begin*/
    private String AppenIDB2() throws JSONException{
    	String temResult = "\r\n";
    	Iterator iter1 = this.t_column_expand.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.t_column_expand.getJSONObject(key);
        	String DEFAULT_VALUE = jsoColumn.getString("DEFAULT_VALUE");
        	if(!java.util.Objects.equals(DEFAULT_VALUE,"")){
	            temResult = temResult+"\r\n    $(\"#"+this.attRBC+"_"+key+"\").val("+DEFAULT_VALUE+");";
        	}
        }
    	return temResult;
    }
    
	//树型结构父类赋值
	/*tree pid set value begin*/
    private String  AppenTPSVB2() throws JSONException{
    	String temResult = "\r\n";
    	if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
    		String C_NODE = this.t_single_expand.getString("C_NODE");
    		temResult += "	$(\"#"+this.attRBC+"_find_"+C_NODE+"_cn_name\").val("+this.attRBC+"_format_"+C_NODE+"(rowData[\""+C_NODE+"\"],\"\",0));";
    	}
    	return temResult;
    }
    
    //主表find按钮隐藏
    /*Main Subsuv Find Button Begin*/
    private String AppenMSFBB2() throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
	            String temRandom = this.GetRandom(COLUMN_FIND_HTML);
	            temResult = temResult+"\r\n    var "+temRandom+"_Div = Get_RandomDiv(\""+temRandom+"\",\"\");";
	            temResult = temResult+"\r\n    if($("+temRandom+"_Div).is(\":hidden\")){";
	            temResult = temResult+"\r\n        $(\"#"+this.attRBC+"_Ope_"+key+"\").hide();";
	            temResult = temResult+"\r\n        $(\"#"+this.attRBC+"_Clear_"+key+"\").hide();";
	            temResult = temResult+"\r\n    }";
	            temResult = temResult+"\r\n";
        	}
        }
        return temResult;
    }

    //表传递参数
    /*Main Subsuv Table Param Begin*/
    private String AppenMSTPB2() throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0") && !java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
				temResult = temResult + "\r\n    $(\"#"+this.attRBC+"_find_"+key+"_cn_name\").val(\"\");";
				if(java.util.Objects.equals(jsoColumn.getString("COLUMN_TYPE"),"2")){
					temResult = temResult + "\r\n    $(\"#"+this.attRBC+"_find_"+key+"\").val(\"-1\");";
				}
				else
					temResult = temResult + "\r\n    $(\"#"+this.attRBC+"_find_"+key+"\").val(\"\");";
				temResult = temResult + "\r\n    $(\"#"+this.attRBC+"_Clear_"+key+"\").show();";
				temResult = temResult + "\r\n    $(\"#"+this.attRBC+"_Ope_"+key+"\").show();";
				
	            temResult = temResult + "\r\n    if("+this.attRBC+"_param.hasOwnProperty(\""+key+"_cn_name\"))";
	            temResult = temResult + "\r\n        $(\"#"+this.attRBC+"_find_"+key+"_cn_name\").val(s_decode("+this.attRBC+"_param[\""+key+"_cn_name\"]));";
	            temResult = temResult + "\r\n    if("+this.attRBC+"_param.hasOwnProperty(\""+key+"\"))";
	            temResult = temResult + "\r\n        $(\"#"+this.attRBC+"_"+key+"\").val("+this.attRBC+"_param[\""+key+"\"]);";
	            temResult = temResult + "\r\n    if("+this.attRBC+"_param.hasOwnProperty(\"hidden_find\") && "+this.attRBC+"_param.hasOwnProperty(\""+key+"_cn_name\")){";
	            temResult = temResult + "\r\n        $(\"#"+this.attRBC+"_Ope_"+key+"\").hide();";
	            temResult = temResult + "\r\n        $(\"#"+this.attRBC+"_Clear_"+key+"\").hide();";
	            temResult = temResult + "\r\n    }";
        	}
        }
        
        if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
        	temResult = temResult + "\r\n	if("+this.attRBC+"_param.hasOwnProperty(\""+this.t_single_expand.getString("P_NODE")+"\"))";
        	temResult = temResult + "\r\n 		$(\"#"+this.attRBC+"_"+this.t_single_expand.getString("P_NODE")+"\").val("+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"\"]);";
        	temResult = temResult + "\r\n   if("+this.attRBC+"_param.hasOwnProperty(\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"))";
        	temResult = temResult + "\r\n       $(\"#"+this.attRBC+"_"+this.t_single_expand.getString("P_NODE")+"_cn_name\").val("+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"]);";
        }
        return temResult;
    }
        		
    /*父页面查询条件参数传递至子页面并赋值*/
    /*Get Find Select param bgein*/
    private String AppenGFSPB2() throws JSONException{
    	String temResult = "";
    	Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
        		if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
    				temResult = temResult + "\r\n		if("+this.attRBC+"_param.hasOwnProperty(\""+key+"\"))";
    	            temResult = temResult + "\r\n        	$(\"#"+this.attRBC+"_"+key+"\").val("+this.attRBC+"_param[\""+key+"\"]);";
    				temResult = temResult + "\r\n		if("+this.attRBC+"_param.hasOwnProperty(\""+key+"_cn_name\"))";
    	            temResult = temResult + "\r\n        	$(\"#"+this.attRBC+"_find_"+key+"_cn_name\").val("+this.attRBC+"_param[\""+key+"_cn_name\"]);";
            	}
        		else{
	        		temResult = temResult + "\r\n		if("+this.attRBC+"_param.hasOwnProperty(\""+key+"\"))";
	        		temResult = temResult + "\r\n        	$(\"#"+this.attRBC+"_"+key+"\").val("+this.attRBC+"_param[\""+key+"\"]);";
        		}
        	}
        }
        return temResult;
    }
    
    /*查询条件弹窗子页面*/
    /*get find subvue bgein*/
    private String AppenGFSB2() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
        		String temValue = COLUMN_FIND_HTML;
                String temRandom = this.GetRandomAbs(temValue);
                String tb_subhtml = temValue.substring(temValue.lastIndexOf("/") == -1 ? 0 :temValue.lastIndexOf("/") + 1,temValue.lastIndexOf("."));       	
            	JSONArray temRe = new JSONArray(COLUMN_FIND_RETURN);
                temResult = temResult+"\r\n    else if(index_subhtml == \""+temValue+"\"){";
                temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",objResult);";
                temResult = temResult+"\r\n        layer.open({";
                temResult = temResult+"\r\n            type: 1,";
                temResult = temResult+"\r\n            area: ['1100px', '600px'],";
                temResult = temResult+"\r\n            fixed: false, //不固定";
                temResult = temResult+"\r\n            maxmin: true,";
                temResult = temResult+"\r\n            content: $(n),";
                temResult = temResult+"\r\n            success: function(layero, index){";
                temResult = temResult+"\r\n                var inputdata = {";
                temResult = temResult+"\r\n                    \"type\":"+this.attRBC+"_type,";
                temResult = temResult+"\r\n                    \"ly_index\":index,";
                temResult = temResult+"\r\n                    \"target_name\":\""+this.attRBC+"_find_"+key+"_cn_name\",";
                temResult = temResult+"\r\n                    \"target_id\":\""+this.attRBC+"_"+key+"\",";
                temResult = temResult+"\r\n                    \"sourc_id\":\""+temRe.getString(0)+"\",";
                temResult = temResult+"\r\n                    \"sourc_name\":\""+temRe.getString(1)+"\"";
                temResult = temResult+"\r\n                };";
                temResult = temResult+"\r\n                loadScript_hasparam(\""+temValue.replace(".vue", "")+".js\",\""+temRandom+"_"+tb_subhtml+"_biz_start\",inputdata);";
                temResult = temResult+"\r\n            },";
                temResult = temResult+"\r\n            end: function(){";
                temResult = temResult+"\r\n                $(n).hide();";
                temResult = temResult+"\r\n            }";
                temResult = temResult+"\r\n        });";
                temResult = temResult+"\r\n    }";               	
            }
        	else if(this.t_column_expand.has(key) 
            		&& java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("IS_FILE"),"1")){
        		String temValue = "t_sys_file2.vue";
        		String temRandom = "A088FR";
        		temResult = temResult+"\r\n    else if(index_subhtml == \""+temValue+"\"){";
	            temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",objResult);";
	            temResult = temResult+"\r\n        layer.open({";
	            temResult = temResult+"\r\n            type: 1,";
	            temResult = temResult+"\r\n            area: ['1100px', '600px'],";
	            temResult = temResult+"\r\n            fixed: false, //不固定";
	            temResult = temResult+"\r\n            maxmin: true,";
	            temResult = temResult+"\r\n            content: $(n),";
	            temResult = temResult+"\r\n            success: function(layero, index){";
	            temResult = temResult+"\r\n                var inputdata = {";
	            temResult = temResult+"\r\n                    \"type\":"+this.attRBC+"_type,";
	            temResult = temResult+"\r\n                    \"ly_index\":index,";
	            temResult = temResult+"\r\n                    \"target_name\":\""+this.attRBC+"_find_"+key+"_cn_name\",";
	            temResult = temResult+"\r\n                    \"target_id\":\""+this.attRBC+"_"+key+"\",";
	            temResult = temResult+"\r\n                    \"sourc_id\":\"MAIN_ID\",";
	            temResult = temResult+"\r\n                    \"sourc_name\":\"NEW_FILE_NAME\"";
	            temResult = temResult+"\r\n                };";
	            temResult = temResult+"\r\n                loadScript_hasparam(\"sys_vue/"+temValue.replace(".vue", "")+".js\",\""+temRandom+"_"+temValue.replace(".vue","")+"_biz_start\",inputdata);";
	            temResult = temResult+"\r\n            },";
	            temResult = temResult+"\r\n            end: function(){";
	            temResult = temResult+"\r\n                $(n).hide();";
	            temResult = temResult+"\r\n            }";
	            temResult = temResult+"\r\n        });";
	            temResult = temResult+"\r\n    }";
        	}
        }
        return temResult;
    }
    
    /*清除输入框验证信息*/
    /*input validate clear begin*/
    private String AppenIVCB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	if(!java.util.Objects.equals(COLUMN_FIND_RETURN,"")){
        		temResult = temResult+"\r\n    "+this.attRBC+"_clear_input_cn_name('"+this.attRBC+"_find_"+key+"_cn_name','"+this.attRBC+"_"+key+"')";
        	}
        }
        return temResult;
    }
        		
    /*查找框函数*/
    /*find qry fun begin*/
    private String AppenFQFB2() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            String temValue = COLUMN_FIND_HTML;
	            String tb_subhtml = temValue.substring(temValue.lastIndexOf("/") == -1 ? 0 :temValue.lastIndexOf("/") + 1,temValue.lastIndexOf("."));    
	            String temRandom = this.GetRandomAbs(temValue);
	            temResult = temResult+"\r\n";
	            temResult = temResult+"\r\nfunction "+this.attRBC+"_"+key+"_cn_name_fun(){";
	            temResult = temResult+"\r\n    "+this.attRBC+"_btn = \""+key+"\"";
	            temResult = temResult+"\r\n    index_subhtml = \""+temValue+"\";";;
	            temResult = temResult+"\r\n    random_subhtml = \""+temRandom+"\";";
	            temResult = temResult+"\r\n    if(loadHtmlSubVueFun(\""+temValue+"\",\""+this.attRBC+"_"+this.attTableName+"_call_vue\") == true){";
	            temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",\"\");";
	            temResult = temResult+"\r\n        layer.open({";
	            temResult = temResult+"\r\n            type: 1,";
	            temResult = temResult+"\r\n            area: ['1100px', '600px'],";
	            temResult = temResult+"\r\n            fixed: false, //不固定";
	            temResult = temResult+"\r\n            maxmin: true,";          
	            //#find查找框返回值
	            JSONArray temRe = new JSONArray(COLUMN_FIND_RETURN);           
	            temResult = temResult+"\r\n            content: $(n),";
	            temResult = temResult+"\r\n            success: function(layero, index){";
	            temResult = temResult+"\r\n                $('#"+temRandom+"_"+tb_subhtml+"_Events').bootstrapTable('resetView');";      
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"ly_index\"] = index;";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_name\"] = \""+this.attRBC+"_find_\"+"+this.attRBC+"_btn"+"+\"_cn_name\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_id\"] = \""+this.attRBC+"_\"+"+this.attRBC+"_btn;";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_id\"] = \""+temRe.getString(0)+"\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_name\"] = \""+temRe.getString(1)+"\";";
	            temResult = temResult+"\r\n            },";
	            temResult = temResult+"\r\n            end: function(){";
	            temResult = temResult+"\r\n                $(n).hide();";
	            temResult = temResult+"\r\n            }";
	            temResult = temResult+"\r\n        });";
	            temResult = temResult+"\r\n     }";
	            temResult = temResult+"\r\n}";
        	}
        	else if(this.t_column_expand.has(key) 
            		&& java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("IS_FILE"),"1")){
        		String temValue = "t_sys_file2.vue";
        		String temRandom = "A088FR";
        		temResult = temResult+"\r\n";
	            temResult = temResult+"\r\nfunction "+this.attRBC+"_"+key+"_cn_name_fun(){";
	            temResult = temResult+"\r\n    "+this.attRBC+"_btn = \""+key+"\"";
	            temResult = temResult+"\r\n    index_subhtml = \""+temValue+"\";";;
	            temResult = temResult+"\r\n    random_subhtml = \""+temRandom+"\";";
	            temResult = temResult+"\r\n    if(loadHtmlSubVueFun(\"sys_vue/"+temValue+"\",\""+this.attRBC+"_"+this.attTableName+"_call_vue\") == true){";
	            temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",\"\");";
	            temResult = temResult+"\r\n        layer.open({";
	            temResult = temResult+"\r\n            type: 1,";
	            temResult = temResult+"\r\n            area: ['1100px', '600px'],";
	            temResult = temResult+"\r\n            fixed: false, //不固定";
	            temResult = temResult+"\r\n            maxmin: true,";         
	            temResult = temResult+"\r\n            content: $(n),";
	            temResult = temResult+"\r\n            success: function(layero, index){";
	            temResult = temResult+"\r\n                $('#"+temRandom+"_t_sys_file_Events').bootstrapTable('resetView');";      
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"ly_index\"] = index;";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_name\"] = \""+this.attRBC+"_find_\"+"+this.attRBC+"_btn"+"+\"_cn_name\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_id\"] = \""+this.attRBC+"_\"+"+this.attRBC+"_btn;";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_id\"] = \"MAIN_ID\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_name\"] = \"NEW_FILE_NAME\";";
	            temResult = temResult+"\r\n            },";
	            temResult = temResult+"\r\n            end: function(){";
	            temResult = temResult+"\r\n                $(n).hide();";
	            temResult = temResult+"\r\n            }";
	            temResult = temResult+"\r\n        });";
	            temResult = temResult+"\r\n     }";
	            temResult = temResult+"\r\n}";
        	}
        }
        return temResult;
    }
        		
    /*输入参数消息*/
    /*input check messages begin*/
    private String AppendICMB() throws JSONException{
        String temResult = "";
        int temIndex = 0;
		Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");        	
            if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){
                temResult = temResult + "\r\n            "+this.attRBC+"_"+key+": {}"; 
            }
            else{
                temIndex = temIndex + 1;
                if(java.util.Objects.equals(COLUMN_TYPE,"1")){
                    temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {maxlength:\"长度不能超过"+COLUMN_LENGTH+"\"}";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"2")){                  
                	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {}";
                    }
                    else{
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {digits: \"必须输入整数\",required : \"必须输入整数\",maxlength:\"长度不能超过10\" }";
                    }
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
                	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {}";
                    }
                    else{
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {number: \"必须输入合法的小数\",required : \"必须输入合法的小数\",maxlength:\"长度不能超过14\"}";
                    }
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
                    temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {date: \"必须输入正确格式的日期\",required : \"必须输入正确格式的日期\",maxlength:\"长度不能超过19\"}";
                }
            }
        }
        return temResult;
    }
        		
    /*输入参数规则*/
    /*input check rules begin*/
    private String AppendICRB() throws JSONException{
        String temResult = "";
        int temIndex = 0;
		Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");        	
            if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){
                temResult = temResult + "\r\n            "+this.attRBC+"_"+key+": {}";
            }
            else{
                temIndex = temIndex + 1;
                if(java.util.Objects.equals(COLUMN_TYPE,"1")){
                    temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {maxlength:"+COLUMN_LENGTH+"}";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"2")){
                	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {}";
                    }
                    else{
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {digits: true,required : true,maxlength:10}";
                    }
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
                	if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"")){
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {}";
                    }
                    else{
                        temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {number: true,required : true,maxlength:14}";
                    }
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
                    temResult = temResult + "\r\n            ,"+this.attRBC+"_"+key+": {date: true,required : true,maxlength:19}";
                }
            }
        }      
        return temResult;
    }
        		
    /*update接口参数*/
    /*update param begin*/
    private String AppendUPB() throws JSONException{
        String temResult = "";
        int temIndex = 0;
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH"); 
            if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){   
            }
            else{
                temIndex = temIndex + 1;
                if(java.util.Objects.equals(COLUMN_TYPE,"1")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": s_encode($(\"#"+this.attRBC+"_"+key+"\").val())";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"2")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
            }
        }
        temIndex = temIndex + 1;
        temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_MAIN_ID\").val()";
        return temResult;
    }
    
    /*insert接口参数*/
    /*insert param begin*/
    private String AppendIPB() throws JSONException{
        String temResult = "";
        int temIndex = 0;
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
            if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){ 
            }
            else{
                temIndex = temIndex + 1;
                if(java.util.Objects.equals(COLUMN_TYPE,"1")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": s_encode($(\"#"+this.attRBC+"_"+key+"\").val())";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"2")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
                    temResult = temResult + "\r\n                ,\"param_value"+String.valueOf(temIndex)+"\": $(\"#"+this.attRBC+"_"+key+"\").val()";
                }
            }
        }
        return temResult;
    }
        		
    /*时间格式初始化*/
    /*form datetime init begin*/
    private String AppenFDIB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
			if(java.util.Objects.equals(COLUMN_TYPE,"4")){
                temResult = temResult + "\r\n    if($(\"#"+this.attRBC+"_"+key+"\").val() == \"\")";
                temResult = temResult + "\r\n    {";
                temResult = temResult + "\r\n        $(\"#"+this.attRBC+"_"+key+"\").val(new Date().Format('yyyy-MM-dd hh:mm:ss'));";               
                temResult = temResult + "\r\n    }";
                temResult = temResult + "\r\n    laydate.render({";
                temResult = temResult + "\r\n        elem: '#"+this.attRBC+"_"+key+"',";
                temResult = temResult + "\r\n        type: 'datetime',";
                temResult = temResult + "\r\n        trigger: 'click'";
                temResult = temResult + "\r\n    });";
			}
        }
        return temResult;
    }
        		
    
    //树形结构函数调用
    /*tree function run begin*/
    private String AppenTFRB() throws JSONException{
    	String temResult = "\r\n";
    	if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
    		temResult += "\r\n	input.N01_sel_"+this.attTableName+"_ByNodeID = "+this.attRDA+"_Bind_Tree(input.N01_sel_"+this.attTableName+"_ByNodeID);";
    	}
    	return temResult;
    }
    
    //树形结构函数定义
    /*tree function defined begin*/
    private String AppenTFDB() throws JSONException{
    	String temResult = "";
    	if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
    		temResult += "\r\nfunction "+this.attRDA+"_Bind_Tree(inputValue){";
    		temResult += "\r\n	//设置父节点名称";
    		temResult += "\r\n    var temPID = {};";
    		temResult += "\r\n	//父节点id和名称";
    		temResult += "\r\n	for (var key in "+this.attRDA+"_select_TreeNode){";				
    		temResult += "\r\n		var temNodeParents = $('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview(\"getParents\","+this.attRDA+"_select_TreeNode[key]);";
    		temResult += "\r\n		if(temNodeParents.length > 0){";
    		temResult += "\r\n			temPID[temNodeParents[0]."+this.t_single_expand.getString("C_NODE").toLowerCase()+"] = temNodeParents[0].text;";
    		temResult += "\r\n			break;";
    		temResult += "\r\n		}";
    		temResult += "\r\n	}";
    		temResult += "\r\n    $.each(inputValue, function (i, obj){";
    		temResult += "\r\n    	inputValue[i][\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = \"\";";
    		temResult += "\r\n		if(temPID.hasOwnProperty(obj."+this.t_single_expand.getString("P_NODE")+")){";
    		temResult += "\r\n			inputValue[i][\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = temPID[obj."+this.t_single_expand.getString("P_NODE")+"];";
    		temResult += "\r\n		}";
    		temResult += "\r\n		else{";
    		temResult += "\r\n			for(var n = 0; n < i; n ++){";
    		temResult += "\r\n				if(inputValue[n]."+this.t_single_expand.getString("C_NODE")+".toString() == obj."+this.t_single_expand.getString("P_NODE")+".toString()){";
    		temResult += "\r\n					inputValue[i][\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = inputValue[n].TEXT.toString();";
    		temResult += "\r\n					temPID[obj."+this.t_single_expand.getString("P_NODE")+"] = inputValue[n].TEXT.toString();";
    		temResult += "\r\n					break;";
    		temResult += "\r\n				}";
    		temResult += "\r\n			}";
    		temResult += "\r\n		}";
    		temResult += "\r\n    });";
    		temResult += "\r\n	//树形控件结果绑定";
//    		temResult += "\r\n	if("+this.attRDA+"_"+this.attTableName+"_tree.toString() == \"0\" || "+this.attRDA+"_"+this.attTableName+"_tree.toString() == \"\"){";
    		temResult += "\r\n	if("+this.attRDA+"_tem_TreeNode.toString() == \"0\" || "+this.attRDA+"_tem_TreeNode.toString() == \"\"){";
    		temResult += "\r\n		var tree_data = formatTree(inputValue);";
    		temResult += "\r\n	    //初始化树控件";
    		temResult += "\r\n		$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview({data: []});";
    		temResult += "\r\n	 	$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview({";
    		temResult += "\r\n	 		data: formatSubTree(tree_data,\""+this.t_single_expand.getString("C_NODE").toLowerCase()+"\",\""+this.t_single_expand.getString("P_NODE").toLowerCase()+"\"),";
    		temResult += "\r\n	 		levels: 1,";
    		temResult += "\r\n	 		onNodeSelected:function(event, node){";
    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode = {};";
    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode[node."+this.t_single_expand.getString("C_NODE").toLowerCase()+"] = node;";
    		temResult += "\r\n				$('#"+this.attRDA+"_btn_"+this.attTableName+"_query').click();";
    		temResult += "\r\n	 		},";
    		temResult += "\r\n	 		onNodeUnselected: function (event, node) {";
    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode = {};";
    		temResult += "\r\n	 		},";
    		temResult += "\r\n	 		onNodeChecked: function (event, node) {";
    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode[node."+this.t_single_expand.getString("C_NODE").toLowerCase()+"] = node;";
    		temResult += "\r\n	 		},";
    		temResult += "\r\n	 		onNodeUnchecked: function (event, node) {";
    		temResult += "\r\n				delete "+this.attRDA+"_select_TreeNode[node."+this.t_single_expand.getString("C_NODE").toLowerCase()+"];";
    		temResult += "\r\n	 		},";
    		temResult += "\r\n			showCheckbox:true,//是否显示多选";
    		temResult += "\r\n			hierarchicalCheck:true";
    		temResult += "\r\n		});";
    		temResult += "\r\n	 	$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview(\"expandAll\");";
    		temResult += "\r\n    }";
    		temResult += "\r\n	return inputValue;";
    		temResult += "\r\n}";
    	}
    	else if(this.t_find_expand.length() > 0){
    		Iterator iter1 = this.t_find_expand.keys();
            while (iter1.hasNext()){
    			String key = (String) iter1.next();
	    		JSONObject jsoexpand = this.t_find_expand.getJSONObject(key);
	    		temResult += "\r\nfunction "+this.attRDA+"_Bind_Tree(inputValue){";
	    		temResult += "\r\n	//设置父节点名称";
	    		temResult += "\r\n    var temPID = {};";
	    		temResult += "\r\n	//父节点id和名称";
	    		temResult += "\r\n	for (var key in "+this.attRDA+"_select_TreeNode){";				
	    		temResult += "\r\n		var temNodeParents = $('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview(\"getParents\","+this.attRDA+"_select_TreeNode[key]);";
	    		temResult += "\r\n		if(temNodeParents.length > 0){";
	    		temResult += "\r\n			temPID[temNodeParents[0]."+jsoexpand.getString("C_NODE").toLowerCase()+"] = temNodeParents[0].text;";
	    		temResult += "\r\n			break;";
	    		temResult += "\r\n		}";
	    		temResult += "\r\n	}";
	    		temResult += "\r\n    $.each(inputValue, function (i, obj){";
	    		temResult += "\r\n    	inputValue[i][\""+jsoexpand.getString("P_NODE")+"_cn_name\"] = \"\";";
	    		temResult += "\r\n		if(temPID.hasOwnProperty(obj."+jsoexpand.getString("P_NODE")+")){";
	    		temResult += "\r\n			inputValue[i][\""+jsoexpand.getString("P_NODE")+"_cn_name\"] = temPID[obj."+jsoexpand.getString("P_NODE")+"];";
	    		temResult += "\r\n		}";
	    		temResult += "\r\n		else{";
	    		temResult += "\r\n			for(var n = 0; n < i; n ++){";
	    		temResult += "\r\n				if(inputValue[n]."+jsoexpand.getString("C_NODE")+".toString() == obj."+jsoexpand.getString("P_NODE")+".toString()){";
	    		temResult += "\r\n					inputValue[i][\""+jsoexpand.getString("P_NODE")+"_cn_name\"] = inputValue[n].TEXT.toString();";
	    		temResult += "\r\n					temPID[obj."+jsoexpand.getString("P_NODE")+"] = inputValue[n].TEXT.toString();";
	    		temResult += "\r\n					break;";
	    		temResult += "\r\n				}";
	    		temResult += "\r\n			}";
	    		temResult += "\r\n		}";
	    		temResult += "\r\n    });";
	    		temResult += "\r\n	//树形控件结果绑定";
	    		temResult += "\r\n	if(1 == 1){";
	    		temResult += "\r\n		var tree_data = formatTree(inputValue);";
	    		temResult += "\r\n	    //初始化树控件";
	    		temResult += "\r\n		$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview({data: []});";
	    		temResult += "\r\n	 	$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview({";
	    		temResult += "\r\n	 		data: formatSubTree(tree_data,\""+jsoexpand.getString("C_NODE").toLowerCase()+"\",\""+jsoexpand.getString("P_NODE").toLowerCase()+"\"),";
	    		temResult += "\r\n	 		levels: 1,";
	    		temResult += "\r\n	 		onNodeSelected:function(event, node){";
	    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode = {};";
	    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode[node."+jsoexpand.getString("C_NODE").toLowerCase()+"] = node;";
	    		temResult += "\r\n				$(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val(node.text);";
	    		temResult += "\r\n				$(\"#"+this.attRDA+"_find_"+key+"\").val(node."+jsoexpand.getString("C_NODE").toLowerCase()+");";
	    		temResult += "\r\n				$('#"+this.attRDA+"_btn_"+this.attTableName+"_query').click();";
	    		temResult += "\r\n	 		},";
	    		temResult += "\r\n	 		onNodeUnselected: function (event, node) {";
	    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode = {};";
	    		temResult += "\r\n	 		},";
	    		temResult += "\r\n	 		onNodeChecked: function (event, node) {";
	    		temResult += "\r\n				"+this.attRDA+"_select_TreeNode[node."+jsoexpand.getString("C_NODE").toLowerCase()+"] = node;";
	    		temResult += "\r\n	 		},";
	    		temResult += "\r\n	 		onNodeUnchecked: function (event, node) {";
	    		temResult += "\r\n				delete "+this.attRDA+"_select_TreeNode[node."+jsoexpand.getString("C_NODE").toLowerCase()+"];";
	    		temResult += "\r\n	 		},";
	    		temResult += "\r\n			showCheckbox:true,//是否显示多选";
	    		temResult += "\r\n			hierarchicalCheck:true";
	    		temResult += "\r\n		});";
	    		temResult += "\r\n	 	$('#"+this.attRDA+"_"+this.attTableName+"_tree').treeview(\"expandAll\");";
	    		temResult += "\r\n    }";
	    		temResult += "\r\n	return inputValue;";
	    		temResult += "\r\n}";
            }
    	}
    	return temResult;
    }
    
    //按钮事件触发页面跳转，1:弹窗、2:系统内tab页、3：浏览器tab页
    /*open new page begin*/
    private String AppenONPB() throws JSONException{
    	String temResult = "";
    	Ope_DB_Cent odc = new Ope_DB_Cent();
    	for(int i = 0; i< this.t_btn_expand.length(); i ++){
    		JSONObject jso = this.t_btn_expand.getJSONObject(i);
    		String temRandom = this.GetRandomAbs(jso.getString("TO_URL"));
    		String fun_def = "";
    		String fun_con = "";
    		String fun_end = "";
    		if(java.util.Objects.equals(jso.getString("BTN_POS"),"0")
            		|| java.util.Objects.equals(jso.getString("BTN_POS"),"1")){
    			temResult += "\r\n";
    			fun_def += "\r\n//“"+jso.getString("BTN_CN_NAME")+"”按钮点击事件";
    			fun_def += "\r\n$('#"+this.attRDA+"_"+jso.getString("BTN_EN_NAME")+"').click(function (){";
    			fun_end = "\r\n});";
    		}
    		else if(java.util.Objects.equals(jso.getString("BTN_POS"),"2")){
    			temResult += "\r\n";
    			fun_def += "\r\n//“"+jso.getString("BTN_CN_NAME")+"”表格内操作按钮点击事件";
    			fun_def += "\r\nfunction "+this.attRDA+"_"+jso.getString("BTN_EN_NAME")+"_fun(){";
    			fun_end = "\r\n}";
    		}
	    	//系统内弹窗
	        if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"0")){
        		fun_con += "\r\n	var temindex_subhtml = \""+jso.getString("TO_URL")+"\";";
        		fun_con += "\r\n	var temrandom_subhtml = \""+temRandom+"\";";
        		fun_con += "\r\n	var temsrcparam = "+jso.getString("TO_URL_PARAM")+";";
        		fun_con += "\r\n	var temtarget = {};";
        		fun_con += "\r\n	//单行选择";
        		fun_con += "\r\n	var rowData = $(\"#"+this.attRDA+"_"+this.attTableName+"_Events\").bootstrapTable('getData')["+this.attRDA+"_select_"+this.attTableName+"_rowId];";
        		fun_con += "\r\n	//多行选择";
        		fun_con += "\r\n	var rowDatas = "+this.attRDA+"_sel_row_"+this.attTableName+"();";
        		fun_con += "\r\n	if(rowDatas.length > 0){";
        		fun_con += "\r\n		$.each(rowDatas, function (i, obj) {";
        		fun_con += "\r\n			for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n				if(temtarget.hasOwnProperty(\"TARGET_NAME\"))";
        		fun_con += "\r\n					temtarget[temsrcparam[i][\"TARGET_NAME\"]] += \",\"+s_encode(obj[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n				else";
        		fun_con += "\r\n					temtarget[temsrcparam[i][\"TARGET_NAME\"]] = s_encode(obj[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n			}";
        		fun_con += "\r\n		});";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	else if(rowData != null){";
        		fun_con += "\r\n		for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n			temtarget[temsrcparam[i][\"TARGET_NAME\"]] = s_encode(rowData[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n		}";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	var temparam = JSON.stringify(temtarget);";
        		fun_con += "\r\n	"+this.attRDA+"_open_to_url1(s_encode(temindex_subhtml),temrandom_subhtml,s_encode(temparam));";
        	}
        	//系统内tab
	        else if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"1")){
        		String temTitle = odc.get_menu_title(jso.getString("TO_URL"));
        		fun_con += "\r\n	var temindex_subhtml = \""+jso.getString("TO_URL")+"\";";
        		fun_con += "\r\n	var temrandom_subhtml = \""+temRandom+"\";";
        		fun_con += "\r\n	var temtitle_subhtml = \""+temTitle+"\";";
        		fun_con += "\r\n	var temsrcparam = "+jso.getString("TO_URL_PARAM")+";";
        		fun_con += "\r\n	var temtarget = {};";
        		fun_con += "\r\n	//单行选择";
        		fun_con += "\r\n	var rowData = $(\"#"+this.attRDA+"_"+this.attTableName+"_Events\").bootstrapTable('getData')["+this.attRDA+"_select_"+this.attTableName+"_rowId];";
        		fun_con += "\r\n	//多行选择";
        		fun_con += "\r\n	var rowDatas = "+this.attRDA+"_sel_row_"+this.attTableName+"();";
        		fun_con += "\r\n	if(rowDatas.length > 0){";
        		fun_con += "\r\n		$.each(rowDatas, function (i, obj) {";
        		fun_con += "\r\n			for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n				if(temtarget.hasOwnProperty(\"TARGET_NAME\"))";
        		fun_con += "\r\n					temtarget[temsrcparam[i][\"TARGET_NAME\"]] += \",\"+s_encode(obj[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n				else";
        		fun_con += "\r\n					temtarget[temsrcparam[i][\"TARGET_NAME\"]] = s_encode(obj[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n			}";
        		fun_con += "\r\n		});";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	else if(rowData != null){";
        		fun_con += "\r\n		for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n			temtarget[temsrcparam[i][\"TARGET_NAME\"]] = s_encode(rowData[temsrcparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n		}";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	var temparam = JSON.stringify(temtarget);";
        		fun_con += "\r\n	"+this.attRDA+"_open_to_url2(s_encode(temindex_subhtml),temrandom_subhtml,s_encode(temparam),temtitle_subhtml);";
        	}
        	//浏览器tab
	        else if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"2")){
        		fun_con += "\r\n	var temsrcparam = "+jso.getString("TO_URL_PARAM")+";";
        		fun_con += "\r\n	var temtarget = {};";
        		fun_con += "\r\n	var tourl = \""+jso.getString("TO_URL")+"\";";
        		fun_con += "\r\n	var vparam = \"\";";
        		fun_con += "\r\n	//单行选择";
        		fun_con += "\r\n	var rowData = $(\"#"+this.attRDA+"_"+this.attTableName+"_Events\").bootstrapTable('getData')["+this.attRDA+"_select_"+this.attTableName+"_rowId];";
        		fun_con += "\r\n	//多行选择";
        		fun_con += "\r\n	var rowDatas = "+this.attRDA+"_sel_row_"+this.attTableName+"();";
        		fun_con += "\r\n	if(rowDatas.length > 0){";
        		fun_con += "\r\n		$.each(rowDatas, function (i, obj) {";
        		fun_con += "\r\n			for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n				if(i != 0)";
        		fun_con += "\r\n					vparam += \"&\"+temsrcparam[i][\"TARGET_NAME\"]+\"=\"+obj[temsrcparam[i][\"SOUR_NAME\"]];";
        		fun_con += "\r\n				else";
        		fun_con += "\r\n					vparam = temsrcparam[i][\"TARGET_NAME\"]+\"=\"+obj[temsrcparam[i][\"SOUR_NAME\"]];";
        		fun_con += "\r\n			}";
        		fun_con += "\r\n		});";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	else if(rowData != null){";
        		fun_con += "\r\n		for(var i = 0; i < temsrcparam.length; i ++){";
        		fun_con += "\r\n			if(i != 0)";
        		fun_con += "\r\n				vparam += \"&\"+temsrcparam[i][\"TARGET_NAME\"]+\"=\"+rowData[temsrcparam[i][\"SOUR_NAME\"]];";
        		fun_con += "\r\n			else";
        		fun_con += "\r\n				vparam = temsrcparam[i][\"TARGET_NAME\"]+\"=\"+rowData[temsrcparam[i][\"SOUR_NAME\"]];";
        		fun_con += "\r\n		}";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	window.open(tourl+\"?\"+vparam,\"_blank\");";
        	}
        	
        	//执行接口事件
        	if(!java.util.Objects.equals(jso.getString("RUN_PROC"),"")){
        		if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"") || java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"-1")){
	        		fun_con += "\r\n	//单行选择";
	        		fun_con += "\r\n	var rowData = $(\"#"+this.attRDA+"_"+this.attTableName+"_Events\").bootstrapTable('getData')["+this.attRDA+"_select_"+this.attTableName+"_rowId];";
	        		fun_con += "\r\n	//多行选择";
	        		fun_con += "\r\n	var rowDatas = "+this.attRDA+"_sel_row_"+this.attTableName+"();";
        		}
        		
        		fun_con += "\r\n	";
        		if(!java.util.Objects.equals(jso.getString("PROC_PARAM"),""))
        			fun_con += "\r\n	var temrunparam = "+jso.getString("PROC_PARAM")+";";
        		else
        			fun_con += "\r\n	var temrunparam = [];";
        		fun_con += "\r\n	var temruntarget = {};";
        		fun_con += "\r\n	if(rowDatas.length > 0){";
        		fun_con += "\r\n		$.each(rowDatas, function (i, obj) {";
        		fun_con += "\r\n			for(var i = 0; i < temrunparam.length; i ++){";
        		fun_con += "\r\n				if(temruntarget.hasOwnProperty(\"TARGET_NAME\"))";
        		fun_con += "\r\n					temruntarget[temrunparam[i][\"TARGET_NAME\"]] += \",\"+s_encode(obj[temrunparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n				else";
        		fun_con += "\r\n					temruntarget[temrunparam[i][\"TARGET_NAME\"]] = s_encode(obj[temrunparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n			}";
        		fun_con += "\r\n		});";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	else if(rowData != null){";
        		fun_con += "\r\n		for(var i = 0; i < temrunparam.length; i ++){";
        		fun_con += "\r\n			temruntarget[temrunparam[i][\"TARGET_NAME\"]] = s_encode(rowData[temrunparam[i][\"SOUR_NAME\"]]);";
        		fun_con += "\r\n		}";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	var inputdata = {";
        		fun_con += "\r\n		\"param_name\": \""+jso.getString("RUN_PROC")+"\",";
        		fun_con += "\r\n		\"session_id\": session_id,";
        		fun_con += "\r\n		\"login_id\": login_id";
        		fun_con += "\r\n	};";
        		fun_con += "\r\n	for (var key in temruntarget){";
        		fun_con += "\r\n    	inputdata[key] = temruntarget[key];";
        		fun_con += "\r\n	}";
        		fun_con += "\r\n	ly_index = layer.load();";
        		fun_con += "\r\n	get_ajax_baseurl(inputdata, \""+this.attRDA+"_get_"+jso.getString("RUN_PROC")+"\");";
        	}
        	if(!java.util.Objects.equals(fun_def,"")){
        		temResult += fun_def+fun_con+fun_end;
        		if(!java.util.Objects.equals(jso.getString("RUN_PROC"),"")){
        			temResult += "\r\n";
        			temResult += "\r\n//执行结果";
        			temResult += "\r\nfunction "+this.attRDA+"_get_"+jso.getString("RUN_PROC")+"(input){";
        			temResult += "\r\n	layer.close(ly_index);";
        			temResult += "\r\n	//操作失败";
        			temResult += "\r\n 	if (Call_OpeResult(input."+jso.getString("RUN_PROC")+") == false)";
        			temResult += "\r\n		return false;";
        			temResult += "\r\n}";
        		}
        	}
        }
        Iterator iter1 = this.t_column_expand.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumnExpand = this.t_column_expand.getJSONObject(key);
        	JSONObject jsoColumnAtt = this.temAtts.getJSONObject(key);
        	String temTo_Url = jsoColumnExpand.getString("TO_URL");
        	String temRandom = this.GetRandomAbs(temTo_Url);
        	if(java.util.Objects.equals(jsoColumnExpand.getString("IS_FILE"),"0")
        		&& !java.util.Objects.equals(temTo_Url,"")){
        		String temTitle = odc.get_menu_title(temTo_Url);
	        	temResult += "\r\n";
	        	temResult += "\r\n//表格列“"+jsoColumnAtt.getString("COLUMN_CN_NAME")+"”点击打开新页面";
	        	temResult += "\r\nfunction "+this.attRDA+"_S_NAME_to_url(value, row, index){";
	        	temResult += "\r\n	var temindex_subhtml = \""+temTo_Url+"\";";
	        	temResult += "\r\n	var temrandom_subhtml = \""+temRandom+"\";";
	        	temResult += "\r\n	var temsrcparam = "+jsoColumnExpand.getString("TO_URL_PARAM")+";";
	        	temResult += "\r\n	var temtarget = {};";
	        	temResult += "\r\n	for(var i = 0; i < temsrcparam.length; i ++){";
	        	temResult += "\r\n		temtarget[temsrcparam[i][\"TARGET_NAME\"]] = s_encode(row[temsrcparam[i][\"SOUR_NAME\"]]);";
	        	temResult += "\r\n	}";
	        	temResult += "\r\n	var temparam = JSON.stringify(temtarget);";
	        	temResult += "\r\n	var strResult = \"<a param1='\"+s_encode(temindex_subhtml)+\"' \"";
	        	temResult += "\r\n		+\" param2='\"+temrandom_subhtml+\"' \"";
	        	temResult += "\r\n		+\" param3='\"+s_encode(temparam)+\"' \"";
	        	temResult += "\r\n		+\" param4='"+temTitle+"' \"";
	        	temResult += "\r\n		+\" onclick='AD1D02_open_url(this,"+jsoColumnExpand.getString("TO_URL_TYPE")+")'>\"+s_decode(value)+\"</a>\";";
	        	//temResult += "\r\n	var strResult = \"<a onclick='"+this.attRDA+"_open_to_url1(\\\'\"+s_encode(temindex_subhtml)+\"\\\',\\\'\"+temrandom_subhtml+\"\\\',\\\'\"+s_encode(temparam)+\"\\\')'>\"+s_decode(value)+\"</a>\";";
	        	temResult += "\r\n	return strResult;";
	        	temResult += "\r\n}";
        	}
        }
    	return temResult;
    }
    
    //表格按钮定义事件
    //*table button events begin*
    private String AppenTBEB() throws JSONException{
    	String temResult = "\r\n";
    	for(int i = 0; i < this.t_btn_expand.length(); i ++){
    		JSONObject jsobtn = this.t_btn_expand.getJSONObject(i);
    		if(java.util.Objects.equals(jsobtn.getString("BTN_POS"),"2")){
    			temResult += "\r\n	,'click #"+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"': function (e, value, row, index){";
    			temResult += "\r\n		"+this.attRDA+"_prev_btn = \"\";";
    			temResult += "\r\n		"+this.attRDA+"_btn = \""+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"_fun\";";
    			temResult += "\r\n		"+this.attRDA+"_select_"+this.attTableName+"_rowId = index.toString();";
    			temResult += "\r\n		//$('#"+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"').click();//此处不需要执行，在table row行click中执行";
    			temResult += "\r\n	}";
    		}
    	}
    	return temResult;
    }
    
    //表格按钮定义
    //*table button defined begin*
    private String AppenTBDB() throws JSONException{
    	String temResult = "\r\n";
    	for(int i = 0; i < this.t_btn_expand.length(); i ++){
    		JSONObject jsobtn = this.t_btn_expand.getJSONObject(i);
    		if(java.util.Objects.equals(jsobtn.getString("BTN_POS"),"2")){
    			temResult += "\r\n	btnHtml += \"&nbsp;<button id='"+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"\' class=\'btn btn-success\' type=\'\'>"
	    				+"<strong><i class=\'fa fa-plus\'></i>"+jsobtn.getString("BTN_CN_NAME")+"</strong></button>\";";
    		}
    	}
    	return temResult;
    }
    
    //主表find按钮隐藏
    /*Main Subsuv Find Button Begin*/
    private String AppenMSFBB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            String temValue = COLUMN_FIND_HTML;
	            String temRandom = this.GetRandom(temValue);
	            temResult = temResult+"\r\n    var "+temRandom+"_Div = Get_RandomDiv(\""+temRandom+"\",\"\");";
	            temResult = temResult+"\r\n    if($("+temRandom+"_Div).is(\":hidden\")){";
	            temResult = temResult+"\r\n        $(\"#"+this.attRDA+"_Ope_"+key+"\").hide();";
	            temResult = temResult+"\r\n        $(\"#"+this.attRDA+"_Clear_"+key+"\").hide();";
	            temResult = temResult+"\r\n    }";
	            temResult = temResult+"\r\n";
        	}
        }
        return temResult;
    }
        		
    //主从表传递参数
    /*Main Subsuv Table Param Begin*/
    private String AppenMSTPB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0") 
        		&& !java.util.Objects.equals(COLUMN_FIND_HTML,"")){
				temResult = temResult + "\r\n    $(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val(\"\");";			
				if(java.util.Objects.equals(COLUMN_TYPE,"2"))
					temResult = temResult + "\r\n    $(\"#"+this.attRDA+"_find_"+key+"\").val(\"-1\");";
				else
					temResult = temResult + "\r\n    $(\"#"+this.attRDA+"_find_"+key+"\").val(\"\");";
				temResult = temResult + "\r\n    $(\"#"+this.attRDA+"_Clear_"+key+"\").show();";
				temResult = temResult + "\r\n    $(\"#"+this.attRDA+"_Ope_"+key+"\").show();";			
	            temResult = temResult + "\r\n    if("+this.attRDA+"_param.hasOwnProperty(\""+key+"_cn_name\"))";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val(s_decode("+this.attRDA+"_param[\""+key+"_cn_name\"]));";
	            temResult = temResult + "\r\n    if("+this.attRDA+"_param.hasOwnProperty(\""+key+"\"))";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_find_"+key+"\").val("+this.attRDA+"_param[\""+key+"\"]);";
	            temResult = temResult + "\r\n    if("+this.attRDA+"_param.hasOwnProperty(\"hidden_find\") && "+this.attRDA+"_param.hasOwnProperty(\""+key+"_cn_name\") ){";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_Ope_"+key+"\").hide();";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_Clear_"+key+"\").hide();";
	            temResult = temResult + "\r\n    }";
        	}
        	else if(!java.util.Objects.equals(COLUMN_QRY,"0") 
        		&& java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            temResult = temResult + "\r\n    if("+this.attRDA+"_param.hasOwnProperty(\""+key+"\"))";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_qry_"+key+"\").val("+this.attRDA+"_param[\""+key+"\"]);";
	            temResult = temResult + "\r\n    if("+this.attRDA+"_param.hasOwnProperty(\"hidden_find\")){";
	            temResult = temResult + "\r\n        $(\"#"+this.attRDA+"_qry_"+key+"\").attr(\"disabled\", true);";
	            temResult = temResult + "\r\n    }";
			}
        }
        return temResult;
    }
        		
    /*tab选项卡按钮点击事件*/
    /*Tab Click Fun Begin*/
    private String AppenTCFB() throws JSONException{
        String temResult = "";
        int temIndex = 1;
        for(int i = 0; i < this.temMainSub.length(); i ++){
        	JSONObject vms = this.temMainSub.getJSONObject(i);
            temResult = temResult + "\r\n$(\"#"+this.attRDA+"_tab_"+String.valueOf(temIndex)+"\").click(function(){";
            temResult = temResult + "\r\n    "+this.attRDA+"_Tab_Flag = "+String.valueOf(temIndex)+";";
            temResult = temResult + "\r\n    "+this.attRDA+"_hide_tab_fun();";
            temResult = temResult + "\r\n    //主子表参数传递";
            temResult = temResult + "\r\n    var temPar = [{\"sourc_id\":\""+vms.getString("MAIN_COLUMN_EN_NAME")+"\",\"target_id\":\""+vms.getString("SUB_COLUMN_EN_NAME")+"\"},{\"sourc_id\":\""+vms.getString("MAIN_TITLE_COLUMN")+"\",\"target_id\":\""+vms.getString("SUB_COLUMN_EN_NAME")+"_cn_name\"}];";
            temResult = temResult + "\r\n    "+this.attRDA+"_show_tab_fun(\""+vms.getString("SUB_TABLE_EN_NAME")+".vue\",\""+vms.getString("SUB_RANDOM")+"\",temPar);";
            temResult = temResult + "\r\n});";
            temResult = temResult + "\r\n";
            temIndex = temIndex + 1;
        }
        temResult = temResult + "\r\n//隐藏tab页选项卡";
        temResult = temResult + "\r\nfunction "+this.attRDA+"_hide_tab_fun(){";
        temResult = temResult + "\r\n    var n = null;";  
        for(int i = 0; i < this.temMainSub.length(); i ++){
        	JSONObject vms = this.temMainSub.getJSONObject(i);
            temResult = temResult + "\r\n    n = Get_RDivNoBuild(\""+vms.getString("SUB_RANDOM")+"\",\"\");";
            temResult = temResult + "\r\n    $(n).hide();"; 
        }
        temResult = temResult + "\r\n}"; 
        temResult = temResult + "\r\n";
        temResult = temResult + "\r\n//判断是否sub子项div页面";
        temResult = temResult + "\r\nfunction "+this.attRDA+"_Is_Sub_Div(temDivId){";
        temResult = temResult + "\r\n    if(temDivId.indexOf(\"XX$TTT\") == 0)";
        temResult = temResult + "\r\n        return false;";
        for(int i = 0; i < this.temMainSub.length(); i ++){
        	JSONObject vms = this.temMainSub.getJSONObject(i);
            temResult = temResult + "\r\n    else if(temDivId.indexOf(\""+vms.getString("SUB_RANDOM")+"\") == 0)";
            temResult = temResult + "\r\n        return true;";
        }
        temResult = temResult + "\r\n    return false;";
        temResult = temResult + "\r\n}";
        temResult = temResult + "\r\n";
        return temResult;
    }
        		
    /*tab页显示子页面*/
    /*get tab subvue begin*/
    private String AppenGTSB() throws JSONException{
        String temResult = "";        
        for(int i = 0; i < this.temMainSub.length(); i ++){
        	JSONObject vms = this.temMainSub.getJSONObject(i);
            temResult = temResult + "\r\n    else if(index_subhtml == \""+vms.getString("SUB_TABLE_EN_NAME")+".vue\"){";
            temResult = temResult + "\r\n        var n = Get_RandomDiv(\""+vms.getString("SUB_RANDOM")+"\",objResult);";
            temResult = temResult + "\r\n        $(n).show();";
            temResult = temResult + "\r\n        //传递参数";
            temResult = temResult + "\r\n        var inputdata = {\"hidden_find\":\"1\"};";
            temResult = temResult + "\r\n        if("+this.attRDA+"_rowCheckData != null){";
            temResult = temResult + "\r\n            inputdata[\""+vms.getString("SUB_COLUMN_EN_NAME")+"_cn_name\"] = "+this.attRDA+"_rowCheckData[GetLowUpp(\""+vms.getString("MAIN_TITLE_COLUMN")+"\")];";
            temResult = temResult + "\r\n            inputdata[\""+vms.getString("SUB_COLUMN_EN_NAME")+"\"] = "+this.attRDA+"_rowCheckData[GetLowUpp(\""+vms.getString("MAIN_COLUMN_EN_NAME")+"\")];";
            temResult = temResult + "\r\n        }";
            temResult = temResult + "\r\n        else{";
            temResult = temResult + "\r\n            inputdata[\""+vms.getString("SUB_COLUMN_EN_NAME")+"_cn_name\"] = \"\";";
            temResult = temResult + "\r\n            inputdata[\""+vms.getString("SUB_COLUMN_EN_NAME")+"\"] = \"-999\";";
            temResult = temResult + "\r\n        }";
            temResult = temResult + "\r\n        loadScript_hasparam(\""+this.attFFD+"/"+vms.getString("SUB_TABLE_EN_NAME")+".js\",\""+vms.getString("SUB_RANDOM")+"_"+vms.getString("SUB_TABLE_EN_NAME")+"_biz_start\",inputdata);";
            temResult = temResult + "\r\n    }";
        }
        
        for(int i = 0; i< this.t_btn_expand.length(); i ++){
    		JSONObject jso = this.t_btn_expand.getJSONObject(i);
    		if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"0")){
	    		String temRandom = this.GetRandomAbs(jso.getString("TO_URL"));
	    		String ToUrl = jso.getString("TO_URL");
	    		String temTable = "";
	    		if(ToUrl.indexOf("/") == -1)
	    			temTable = ToUrl.replace(".vue","");
	    		else
	    			temTable = ToUrl.substring(ToUrl.lastIndexOf("/")+1,ToUrl.indexOf(".vue"));
	    		temResult +=  "\r\n	else if(index_subhtml == \""+jso.getString("TO_URL")+"\"){";
	    		temResult +=  "\r\n		var n = Get_RandomDiv(\""+temRandom+"\",objResult);";
	    		temResult +=  "\r\n		layer.open({";
	    		temResult +=  "\r\n			type: 1,";
	    		temResult +=  "\r\n	        area: ['1100px', '600px'],";
	    		temResult +=  "\r\n	        fixed: false, //不固定";
	    		temResult +=  "\r\n	        maxmin: true,";
	    		temResult +=  "\r\n	        content: $(n),";
	    		temResult +=  "\r\n	        success: function(layero, index){";
	    		temResult +=  "\r\n	        	"+this.attRDA+"_toparam[\"ly_index\"] = index;";
	    		temResult +=  "\r\n	        	loadScript_hasparam(\""+ToUrl.replace(".vue","")+".js\",\""+temRandom+"_"+temTable+"_biz_start\","+this.attRDA+"_toparam);";
	    		temResult +=  "\r\n	        },";
	    		temResult +=  "\r\n			end: function(){";
	    		temResult +=  "\r\n				$(n).hide();";
	    		temResult +=  "\r\n			}";
	    		temResult +=  "\r\n	    });";
	    		temResult +=  "\r\n	}";
    		}
        }
        
        Iterator iter1 = this.t_column_expand.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
    		JSONObject jso = this.t_column_expand.getJSONObject(key);
    		if(java.util.Objects.equals(jso.getString("TO_URL_TYPE"),"0")
    			&& java.util.Objects.equals(jso.getString("IS_FILE"),"0")){
	    		String temRandom = this.GetRandomAbs(jso.getString("TO_URL"));
	    		String ToUrl = jso.getString("TO_URL");
	    		String temTable = "";
	    		if(ToUrl.indexOf("/") == -1)
	    			temTable = ToUrl.replace(".vue","");
	    		else
	    			temTable = ToUrl.substring(ToUrl.lastIndexOf("/")+1,ToUrl.indexOf(".vue"));
	    		temResult +=  "\r\n	else if(index_subhtml == \""+jso.getString("TO_URL")+"\"){";
	    		temResult +=  "\r\n		var n = Get_RandomDiv(\""+temRandom+"\",objResult);";
	    		temResult +=  "\r\n		layer.open({";
	    		temResult +=  "\r\n			type: 1,";
	    		temResult +=  "\r\n	        area: ['1100px', '600px'],";
	    		temResult +=  "\r\n	        fixed: false, //不固定";
	    		temResult +=  "\r\n	        maxmin: true,";
	    		temResult +=  "\r\n	        content: $(n),";
	    		temResult +=  "\r\n	        success: function(layero, index){";
	    		temResult +=  "\r\n	        	"+this.attRDA+"_toparam[\"ly_index\"] = index;";
	    		temResult +=  "\r\n	        	loadScript_hasparam(\""+ToUrl.replace(".vue","")+".js\",\""+temRandom+"_"+temTable+"_biz_start\","+this.attRDA+"_toparam);";
	    		temResult +=  "\r\n	        },";
	    		temResult +=  "\r\n			end: function(){";
	    		temResult +=  "\r\n				$(n).hide();";
	    		temResult +=  "\r\n			}";
	    		temResult +=  "\r\n	    });";
	    		temResult +=  "\r\n	}";
    		}
        }
        return temResult;
    }
        		
    /*查询条件参数传递至子页面,再加载*/
    /*Send Two FindSelect param bgein*/
    private String AppenSTFPB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
        		if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
    	            temResult = temResult + "\r\n                var tem"+key+" = $(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val();";
    	            temResult = temResult + "\r\n                if(tem"+key+" != \"\"){";
    	            temResult = temResult + "\r\n                    "+this.attRBC+"_param[\""+key+"_cn_name\"] = tem"+key+";";
    	            temResult = temResult + "\r\n                    "+this.attRBC+"_param[\""+key+"\"] = $(\"#"+this.attRDA+"_find_"+key+"\").val();";
    	            temResult = temResult + "\r\n                }";
    	        }
        		else{
		            temResult = temResult + "\r\n                var tem"+key+" = $(\"#"+this.attRDA+"_qry_"+key+"\").val();";
		            temResult = temResult + "\r\n                if(tem"+key+" != \"\"){";
		            temResult = temResult + "\r\n                    "+this.attRBC+"_param[\""+key+"\"] = tem"+key+";";
		            temResult = temResult + "\r\n                }";
        		}
        	}
        }
        
        if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
        	temResult = temResult + "\r\n                if($.isEmptyObject("+this.attRDA+"_select_TreeNode)){";
        	temResult = temResult + "\r\n                    "+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"\"] = \"0\";";
        	temResult = temResult + "\r\n                    "+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = \"\";";
        	temResult = temResult + "\r\n                }";
        	temResult = temResult + "\r\n                else{";
        	temResult = temResult + "\r\n                	//父节点id和名称";
        	temResult = temResult + "\r\n                	for (var key in "+this.attRDA+"_select_TreeNode){";				
        	temResult = temResult + "\r\n                		"+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"\"] = "+this.attRDA+"_select_TreeNode[key]."+this.t_single_expand.getString("C_NODE").toLowerCase()+";";
        	temResult = temResult + "\r\n                		"+this.attRBC+"_param[\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = "+this.attRDA+"_select_TreeNode[key].text;";
        	temResult = temResult + "\r\n                	}";
        	temResult = temResult + "\r\n                }";
        }
        return temResult;
    }
        		
    /*查询条件参数传递至子页面,初次加载*/
    /*Send One FindSelect param bgein*/
    private String AppenSOFPB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
	            temResult = temResult + "\r\n                var tem"+key+" = $(\"#"+this.attRDA+"_qry_"+key+"\").val();";
	            temResult = temResult + "\r\n                if(tem"+key+" != \"\"){";
	            temResult = temResult + "\r\n                    "+this.attRDA+"_toparam[\""+key+"\"] = tem"+key+";";
	            temResult = temResult + "\r\n                }";
        	}
        }
        iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            temResult = temResult + "\r\n                var tem"+key+" = $(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val();";
	            temResult = temResult + "\r\n                if(tem"+key+" != \"\"){";
	            temResult = temResult + "\r\n                    "+this.attRDA+"_toparam[\""+key+"_cn_name\"] = tem"+key+";";
	            temResult = temResult + "\r\n                    "+this.attRDA+"_toparam[\""+key+"\"] = $(\"#"+this.attRDA+"_find_"+key+"\").val();";
	            temResult = temResult + "\r\n                }";
        	}
        }
        
        if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
        	temResult = temResult + "\r\n				if($.isEmptyObject("+this.attRDA+"_select_TreeNode)){";
        	temResult = temResult + "\r\n					"+this.attRDA+"_toparam[\""+this.t_single_expand.getString("P_NODE")+"\"] = \"\";";
        	temResult = temResult + "\r\n					"+this.attRDA+"_toparam[\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = \"\";";
        	temResult = temResult + "\r\n				}";
        	temResult = temResult + "\r\n				else{";
        	temResult = temResult + "\r\n					//父节点id和名称";
        	temResult = temResult + "\r\n					for (var key in "+this.attRDA+"_select_TreeNode){";				
        	temResult = temResult + "\r\n						"+this.attRDA+"_toparam[\""+this.t_single_expand.getString("P_NODE")+"\"] = "+this.attRDA+"_select_TreeNode[key]."+this.t_single_expand.getString("C_NODE").toLowerCase()+";";
        	temResult = temResult + "\r\n						"+this.attRDA+"_toparam[\""+this.t_single_expand.getString("P_NODE")+"_cn_name\"] = "+this.attRDA+"_select_TreeNode[key].text;";
        	temResult = temResult + "\r\n					}";
        	temResult = temResult + "\r\n				}";
        }
        return temResult;
    }
    
    /*重置查询条件变量*/
	/*refresh query param begin*/
        		
    /*重置查询条件变量*/
    /*refresh query param begin*/
    private String AppenRQPB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
				if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"1")){
		            temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = \"\";";
				}
				else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"2")){
	                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = \"-1\";";
				}
				else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"3")){
	                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = \"0\";";
				}
				else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"4")){
	                temResult = temResult + "\r\n    "+this.attRDA+"_tem_begin_"+key+" = new Date().Format(\"yyyy-MM-dd hh:mm:ss\");";
	                temResult = temResult + "\r\n    "+this.attRDA+"_tem_end_"+key+" = new Date().Format(\"yyyy-MM-dd hh:mm:ss\");";
				}
        	}
        }
        if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
        	temResult = temResult + "\r\n   "+this.attRDA+"_select_TreeNode = {};";
        	temResult = temResult + "\r\n   "+this.attRDA+"_tem_TreeNode = \"\";";
        }        
        return temResult;
    }
    
    /*查询条件弹窗子页面*/
    /*get find subvue bgein*/
    private String AppenGFSB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0") && !java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            String temValue = COLUMN_FIND_HTML;
	            String temtb_name_html = "";
	            if(temValue.indexOf("/") != -1)
	            	temtb_name_html = temValue.substring(temValue.lastIndexOf("/")+1,temValue.length());
	            else
	            	temValue = this.attFFD+"/"+temValue;
	            
	            JSONArray temRe = new JSONArray(COLUMN_FIND_RETURN);
	            String temRandom = this.GetRandom(temValue);
	            temResult = temResult+"\r\n    else if(index_subhtml == \""+temValue+"\"){";
	            temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",objResult);";
	            temResult = temResult+"\r\n        layer.open({";
	            temResult = temResult+"\r\n            type: 1,";
	            temResult = temResult+"\r\n            area: ['1100px', '600px'],";
	            temResult = temResult+"\r\n            fixed: false, //不固定";
	            temResult = temResult+"\r\n            maxmin: true,";
	            temResult = temResult+"\r\n            content: $(n),";
	            temResult = temResult+"\r\n            success: function(layero, index){";
	            temResult = temResult+"\r\n                var inputdata = {";
	            temResult = temResult+"\r\n                    \"type\":"+this.attRDA+"_type,";
	            temResult = temResult+"\r\n                    \"ly_index\":index,";
	            temResult = temResult+"\r\n                    \"target_name\":\""+this.attRDA+"_find_"+key+"_cn_name\",";
	            temResult = temResult+"\r\n                    \"target_id\":\""+this.attRDA+"_find_"+key+"\",";
	            temResult = temResult+"\r\n                    \"sourc_id\":\""+temRe.getString(0)+"\",";
	            temResult = temResult+"\r\n                    \"sourc_name\":\""+temRe.getString(1)+"\"";
	            temResult = temResult+"\r\n                };";
	            temResult = temResult+"\r\n                loadScript_hasparam(\""+temValue.replace(".vue", "")+".js\",\""+temRandom+"_"+temtb_name_html.replace(".vue","")+"_biz_start\",inputdata);";
	            temResult = temResult+"\r\n            },";
	            temResult = temResult+"\r\n            end: function(){";
	            temResult = temResult+"\r\n                $(n).hide();";
	            temResult = temResult+"\r\n            }";
	            temResult = temResult+"\r\n        });";
	            temResult = temResult+"\r\n    }";
        	}
        }
        return temResult;
    }
        		
    /*新增按钮页面传父类ID或其他信息*/
    /*add param value begin*/
    private String AppenAPVB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            temResult = temResult+"\r\n            $.each(inputs, function (i, obj) {";
	            temResult = temResult+"\r\n                if (obj.id.toUpperCase() == \""+this.attRDA+"_find_"+key+"_cn_name\".toUpperCase()) {";
	            temResult = temResult+"\r\n                    $(obj).val($(\"#"+this.attRDA+"_find_"+key+"_cn_name\").val());";
	            temResult = temResult+"\r\n                }";
	            temResult = temResult+"\r\n                else if ((\""+this.attRDA+"_find_\"+obj.id).toUpperCase() == \""+this.attRDA+"_find_"+key+"\".toUpperCase()){";
	            temResult = temResult+"\r\n                    $(obj).val($(\"#"+this.attRDA+"_find_\"+obj.id).val());";
	            temResult = temResult+"\r\n                }";
	            temResult = temResult+"\r\n            });";
	            temResult = temResult+"\r\n";
        	}
        }
        return temResult;
    }
        		
    /*设置查询条件变量*/
    /*set query param begin*/
    private String AppenSQPB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
	            String temValue = COLUMN_CN_NAME;
	            //查找框
	            if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
		            if(java.util.Objects.equals(COLUMN_TYPE,"1")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_find_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"2")){ 
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_find_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_find_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_begin_"+key+" = $(\"#"+this.attRDA+"_qry_begin_"+key+"\").val();";
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_end_"+key+" = $(\"#"+this.attRDA+"_qry_end_"+key+"\").val();";
		            }	            	
	            }
	            //查询条件
	            else{
		            if(java.util.Objects.equals(COLUMN_TYPE,"1")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_qry_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"2")){ 
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_qry_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_"+key+" = $(\"#"+this.attRDA+"_qry_"+key+"\").val();";
		            }
		            else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_begin_"+key+" = $(\"#"+this.attRDA+"_qry_begin_"+key+"\").val();";
		                temResult = temResult + "\r\n    "+this.attRDA+"_tem_end_"+key+" = $(\"#"+this.attRDA+"_qry_end_"+key+"\").val();";
		            }
	            }
        	}
        }
        
        //树型控件节点选择
        if(this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1")){
        	temResult = temResult + "\r\n	if($.isEmptyObject("+this.attRDA+"_select_TreeNode)){";
        	temResult = temResult + "\r\n		"+this.attRDA+"_tem_TreeNode = \"\";";
        	temResult = temResult + "\r\n	}";
        	temResult = temResult + "\r\n	else{";
        	temResult = temResult + "\r\n		//父节点id和名称";
        	temResult = temResult + "\r\n		for (var key in "+this.attRDA+"_select_TreeNode){";				
        	temResult = temResult + "\r\n			"+this.attRDA+"_tem_TreeNode = "+this.attRDA+"_select_TreeNode[key]."+this.t_single_expand.getString("C_NODE").toLowerCase()+";";
        	temResult = temResult + "\r\n			break;";
        	temResult = temResult + "\r\n		}";
        	temResult = temResult + "\r\n	}";
        }
        return temResult;
    }
        		
    /*传递查询条件变量*/
    /*get query param begin*/
    private String AppenGQPB() throws JSONException{
        String temResult = "";
        int temIndex = 0;
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0") 
        			&& (this.t_single_expand.length() == 0 || java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"0"))){
	            temIndex = temIndex + 1;
	            if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            	 if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"1")){
//	            		 temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": s_encode("+this.attRDA+"_tem_"+key+")";
//	            		 temIndex = temIndex + 1;
	            		 temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": s_encode("+this.attRDA+"_tem_"+key+")";
	            	 }
			         else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"2")){  
			             temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
			             temIndex = temIndex + 1;
			             temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
			         }
			         else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"3")){  
//			             temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
//			             temIndex = temIndex + 1;
			             temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
			         }
			         else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"4")){
			            temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_begin_"+key;
			            temIndex = temIndex + 1;
			            temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_end_"+key;
			         }
	            }
	            else{
		            if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"1")){
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": s_encode("+this.attRDA+"_tem_"+key+")";
		            }
		            else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"2")){  
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
		                temIndex = temIndex + 1;
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
		            }
		            else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"3")){  
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_"+key;
		            }
		            else if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"4")){
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_begin_"+key;
		                temIndex = temIndex + 1;
		                temResult = temResult + "\r\n        ,\"param_value"+String.valueOf(temIndex)+"\": "+this.attRDA+"_tem_end_"+key;
		            }
	            }
        	}
        }
        return temResult;
    }
         		
    /*查询条件初始化*/
    /*query conditions init begin*/
    private String AppenQCIB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temQryAtt.keys();
        while (iter1.hasNext()){
        	String key = (String) iter1.next();
        	String temInput = "";
            String temValue = this.temQryAtt.getJSONObject(key).getString("COLUMN_CN_NAME");            
            if(java.util.Objects.equals(this.temQryAtt.getJSONObject(key).getString("COLUMN_TYPE"),"4")){
                temResult = temResult + "\r\n   $(\"#"+this.attRDA+"_qry_begin_"+key+"\").val(DateAdd(\"d\", -5, new Date()).Format('yyyy-MM-dd hh:mm:ss'));";
                temResult = temResult + "\r\n   laydate.render({";
                temResult = temResult + "\r\n       elem: '#"+this.attRDA+"_qry_begin_"+key+"',";
                temResult = temResult + "\r\n       type: 'datetime',";
                temResult = temResult + "\r\n       trigger: 'click'";
                temResult = temResult + "\r\n   });";
                temResult = temResult + "\r\n   $(\"#"+this.attRDA+"_qry_end_"+key+"\").val(DateAdd(\"d\", 1, new Date()).Format('yyyy-MM-dd hh:mm:ss'));";
                temResult = temResult + "\r\n   laydate.render({";
                temResult = temResult + "\r\n       elem: '#"+this.attRDA+"_qry_end_"+key+"',";
                temResult = temResult + "\r\n       type: 'datetime',";
                temResult = temResult + "\r\n       trigger: 'click'";
                temResult = temResult + "\r\n   });";
            }
        }
        return temResult;
    }
        		
    //#循环设置web html的column
    private String AppendColumn() throws JSONException{
    	String temResult = "";           
        if(this.temAtts.length() > 0){
            int temIndex = 0;
            Iterator iter1 = this.temAtts.keys();
            while (iter1.hasNext()){
    			String key = (String) iter1.next();
            	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
            	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
            	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
            	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
            	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
            	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
            	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
            	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
            	String temInput = "";
                if(temIndex > 0){
                    temResult = temResult + ",";
                }
                temIndex = temIndex + 1;
                String temFormat = "";
                
                if(this.t_column_expand.has(key) 
                	&& java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("IS_FILE"),"0")
                	&& !java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("TO_URL"),""))
                	temFormat = "\r\n        ,formatter: "+this.attRDA+"_"+key+"_to_url";
                else if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,""))
                	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                		JSONArray temJary = new JSONArray(COLUMN_FIND_RETURN);
                		if(java.util.Objects.equals(temJary.getString(0),temJary.getString(1)))
                			temFormat = "\r\n        ,formatter: set_s_decode";
                		else
                			temFormat = "\r\n        ,formatter: "+this.attRDA+"_format_"+key;
                	}
                	else
                		temFormat = "\r\n        ,formatter: "+this.attRDA+"_format_"+key;    
                if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){                     
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true,";
                    temResult = temResult + "\r\n        visible: false,";
                    temResult = temResult + "\r\n        width: 60";
                    temResult = temResult + "\r\n    }";
                }
                //附件链接
                else if(this.t_column_expand.has(key) 
                		&& java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("IS_FILE"),"1")){
                	temResult = temResult + "\r\n    {";
                	temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                	temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"_FIND_CN_NAME',";
                	temResult = temResult + "\r\n        sortable: true";
                	temResult = temResult + "\r\n        ,formatter: set_file_show";
                	temResult = temResult + "\r\n    },";
                	temResult = temResult + "\r\n    {";
                	temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                	temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                	temResult = temResult + "\r\n        sortable: true,";
                	temResult = temResult + "\r\n        visible: false";
                	temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(key.toUpperCase(),"IS_AVA")){                 
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(key.toUpperCase(),"S_STATE")){                 
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"4")){                   
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    if(java.util.Objects.equals(temFormat,"")){
                        temFormat = "\r\n        ,formatter: set_time_decode";
                    }
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"3")){                     
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"2")){                   
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                else if(java.util.Objects.equals(COLUMN_TYPE,"1")){                    
                    temResult = temResult + "\r\n    {";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"',";
                    temResult = temResult + "\r\n        sortable: true";
                    if(java.util.Objects.equals(temFormat,"")){
                        temFormat = "\r\n        ,formatter: set_s_decode";
                    }
                    temResult = temResult + temFormat;
                    temResult = temResult + "\r\n    }";
                }
                
                if(this.t_single_expand.length() > 0 && java.util.Objects.equals(key.toUpperCase(),this.t_single_expand.getString("P_NODE"))){
                	temResult = temResult + "\r\n    ,{";
                    temResult = temResult + "\r\n        title: '"+COLUMN_CN_NAME+"名称',";
                    temResult = temResult + "\r\n        field: '"+key.toUpperCase()+"_cn_name',";
                    temResult = temResult + "\r\n        sortable: true";
                    temResult = temResult +  "\r\n       ,formatter: set_s_decode";
                    temResult = temResult + "\r\n    }";
                }
            }
        }
        return temResult;
    }
        		
    /*查找框函数*/
    /*find qry fun begin*/
    private String AppenFQFB() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0") && !java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	            String temValue = COLUMN_FIND_HTML; 
	            String temtb_name_html = "";
	            if(temValue.indexOf("/") != -1)
	            	temtb_name_html = temValue.substring(temValue.lastIndexOf("/")+1,temValue.length());
	            else
	            	temValue = this.attFFD+"/"+temValue;
	            String temRandom = this.GetRandom(temValue);
	            JSONArray temRe = new JSONArray(COLUMN_FIND_RETURN);
	            temResult = temResult+"\r\nfunction "+this.attRDA+"_"+key+"_cn_name_fun(){";
	            temResult = temResult+"\r\n    index_subhtml = \""+temValue+"\";";;
	            temResult = temResult+"\r\n    random_subhtml = \""+temRandom+"\";";
	            temResult = temResult+"\r\n    if(loadHtmlSubVueFun(\""+temValue+"\",\""+this.attRDA+"_"+this.attTableName+"_call_vue\") == true){";
	            temResult = temResult+"\r\n        var n = Get_RandomDiv(\""+temRandom+"\",\"\");";
	            temResult = temResult+"\r\n        layer.open({";
	            temResult = temResult+"\r\n            type: 1,";
	            temResult = temResult+"\r\n            area: ['1100px', '600px'],";
	            temResult = temResult+"\r\n            fixed: false, //不固定";
	            temResult = temResult+"\r\n            maxmin: true,";     
	            //#find查找框返回值
	            temRe = new JSONArray(COLUMN_FIND_RETURN);         
	            temResult = temResult+"\r\n            content: $(n),";
	            temResult = temResult+"\r\n            success: function(layero, index){";
	            temResult = temResult+"\r\n                $('#"+temRandom+"_"+temtb_name_html.replace(".vue","")+"_Events').bootstrapTable('resetView');";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"ly_index\"] = index;";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_name\"] = \""+this.attRDA+"_find_"+key+"_cn_name\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"target_id\"] = \""+this.attRDA+"_find_"+key+"\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_id\"] = \""+temRe.getString(0)+"\";";
	            temResult = temResult+"\r\n                "+temRandom+"_param[\"sourc_name\"] = \""+temRe.getString(1)+"\";";
	            temResult = temResult+"\r\n            },";
	            temResult = temResult+"\r\n            end: function(){";
	            temResult = temResult+"\r\n                $(n).hide();";
	            temResult = temResult+"\r\n            }";
	            temResult = temResult+"\r\n        });";
	            temResult = temResult+"\r\n     }";
	            temResult = temResult+"\r\n}";
        	}
        }
        return temResult;
    }
    
    /*定义查询条件变量*/
    /*declare query param begin*/
    private String AppenDQPB1() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
	        	if(java.util.Objects.equals(COLUMN_TYPE,"1"))
	                temResult = temResult + "\r\nvar "+this.attRDA+"_tem_"+key+" = \"\";";
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"2"))
	                temResult = temResult + "\r\nvar "+this.attRDA+"_tem_"+key+" = \"-1\";";
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"3"))
	                temResult = temResult + "\r\nvar "+this.attRDA+"_tem_"+key+" = \"-1\";";
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"4")){
	                temResult = temResult + "\r\nvar "+this.attRDA+"_tem_begin_"+key+" = new Date().Format(\"yyyy-MM-dd hh:mm:ss\");";
	                temResult = temResult + "\r\nvar "+this.attRDA+"_tem_end_"+key+" = new Date().Format(\"yyyy-MM-dd hh:mm:ss\");";
	            }
        	}
        }
        
        if(this.t_single_expand.length() > 0){
        	temResult = temResult + "\r\nvar "+this.attRDA+"_tem_TreeNode = \"\";";
        }
    	return temResult;
    }
        		
    //#编辑页面表单标签
    private String AppendEditFormHtml() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        boolean bColTwo = false;
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	String temInput = "";
            String temValue = COLUMN_CN_NAME;
            String temTwo = "";
            String divHidden = "";
            String inputPNode = "";
            if(this.t_single_expand.length() > 0 && java.util.Objects.equals(key,this.t_single_expand.getString("P_NODE"))){
            	divHidden = " style=\"display:none\" ";
            	inputPNode = "\r\n                             	<input class=\"form-control\" id=\""+this.attRBC+"_"+this.t_single_expand.getString("P_NODE")+"_cn_name\" name=\""+this.attRBC+"_"+this.t_single_expand.getString("P_NODE")+"_cn_name\" type=\"text\" readonly=\"true\" placeholder=\"请输入信息\"/>";
            }
            
            if(java.util.Objects.equals(key.toUpperCase(),"MAIN_ID")){
            	temTwo =          "\r\n                        <div class=\"col-sm-6\">";
            	temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>";
            	temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
            	temTwo = temTwo + "\r\n                                <input class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\" readonly=\"true\" />";
            	temTwo = temTwo + "\r\n                            </div>";
            	temTwo = temTwo + "\r\n                        </div>";
            	//每行放2列
            	if(bColTwo){
	                temResult = temResult + temTwo;
	                temResult = temResult + "\r\n                    </div>";
	                bColTwo = false;
            	}
            	else{
	                temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
	                temResult = temResult + temTwo;
	                bColTwo = true;
            	}
            }
            else if(this.t_column_expand.has(key) 
            		&& java.util.Objects.equals(this.t_column_expand.getJSONObject(key).getString("IS_FILE"),"1")){
            	temTwo = 		  "\r\n                        <div class=\"col-sm-6\">";
            	temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>";
            	temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
            	temTwo = temTwo + "\r\n                                <span type=\"find\">";
            	temTwo = temTwo + "\r\n                                	<input class=\"form-control form-search\" id=\""+this.attRBC+"_find_"+key+"_cn_name\" name=\""+this.attRBC+"_find_"+key+"_cn_name\" type=\"text\" placeholder=\"请输入信息\" readonly=\"true\"/>";
            	temTwo = temTwo + "\r\n                                	<img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
            	temTwo = temTwo + "\r\n                                	<img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name('"+this.attRBC+"_find_"+key+"_cn_name','"+this.attRBC+"_"+key+"')\">";
            	temTwo = temTwo + "\r\n                                	<input name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"-1\" type=\"text\" style=\"display:none\">";
            	temTwo = temTwo + "\r\n                                </span>";
            	temTwo = temTwo + "\r\n                                <span type=\"find\"> ";
            	temTwo = temTwo + "\r\n                                	<div id=\""+this.attRBC+"_"+key+"_div\" name=\""+this.attRBC+"_"+key+"_div\"></div>";
                temTwo = temTwo + "\r\n                                </span>";
                temTwo = temTwo + "\r\n                            </div>";
                temTwo = temTwo + "\r\n                        </div>";
            	//每行放2列
            	if(bColTwo){
            		temResult = temResult + temTwo;
            		temResult = temResult + "\r\n                    </div>";
            		bColTwo = false;
            	}
            	else{
            		temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		bColTwo = true;
            	}
            }
            else if(java.util.Objects.equals(COLUMN_TYPE,"1"))
            {
            	if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100){
	                temTwo =  		  "\r\n                        <div class=\"col-sm-6\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
            	}
            	else{
	                temTwo =  		  "\r\n                        <div class=\"col-sm-12\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-2 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-10\">";
            	}
                //查找框
                if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	JSONArray jsoCOLUMN_FIND_RETURN = new JSONArray(COLUMN_FIND_RETURN);
                	if(!java.util.Objects.equals(jsoCOLUMN_FIND_RETURN.getString(0),jsoCOLUMN_FIND_RETURN.getString(1))){
	                	temInput =            "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" id=\""+this.attRBC+"_find_"+key+"_cn_name\" name=\""+this.attRBC+"_find_"+key+"_cn_name\" type=\"text\" readonly=\"true\">";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+this.attRBC+"_find_"+key+"_cn_name\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                    <input name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"-1\" type=\"text\" style=\"display:none\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                	else{
	                	temInput =            "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"\" type=\"text\" >";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+key+"\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                }
                //下拉框
                else if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"") 
                	&& java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	temInput = "<select class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" placeholder=\"请输入信息\"></select>"; 
                }
                //输入框
                else if(!java.util.Objects.equals(COLUMN_LENGTH,"") 
                		&& Integer.valueOf(COLUMN_LENGTH)>= 500)
                    temInput = "<textarea class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" rows=\"5\" "+divHidden+"></textarea>"+inputPNode;
                else
                    temInput = "<input class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\" placeholder=\"请输入信息\" "+divHidden+"/>"+inputPNode;
                temTwo = temTwo + "\r\n                                "+temInput;
                temTwo = temTwo + "\r\n                            </div>";
                temTwo = temTwo + "\r\n                        </div>";
                
                //每行放2列
            	if(bColTwo){
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) > 100){
                		temResult = temResult + "\r\n                    </div>";
            			temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		}
            		temResult = temResult + temTwo;
            		temResult = temResult + "\r\n                    </div>";
            		bColTwo = false;
            	}
            	else{
            		temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100)
            			bColTwo = true;
            		else
                		temResult = temResult + "\r\n                    </div>";
            	}
            }
            else if(java.util.Objects.equals(COLUMN_TYPE,"2")){
            	if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100){
	                temTwo =  		  "\r\n                        <div class=\"col-sm-6\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
            	}
            	else{
	                temTwo =  		  "\r\n                        <div class=\"col-sm-12\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-2 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-10\">";
            	}
            	
                //查找框
                if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	JSONArray jsoCOLUMN_FIND_RETURN = new JSONArray(COLUMN_FIND_RETURN);
                	if(!java.util.Objects.equals(jsoCOLUMN_FIND_RETURN.getString(0),jsoCOLUMN_FIND_RETURN.getString(1))){
	                	temInput = "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" id=\""+this.attRBC+"_find_"+key+"_cn_name\" name=\""+this.attRBC+"_find_"+key+"_cn_name\" type=\"text\" readonly=\"true\">";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+this.attRBC+"_find_"+key+"_cn_name\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                    <input name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"-1\" type=\"text\" style=\"display:none\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                	else{
	                	temInput = "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"\" type=\"text\" >";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+key+"\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                }
                //下拉框
                else if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"") 
                	&& java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	temInput = "<select class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" placeholder=\"请输入信息\"></select>"; 
                }
                //输入框
                else if(!java.util.Objects.equals(COLUMN_LENGTH,"") 
                		&& Integer.valueOf(COLUMN_LENGTH)>= 500)
                    temInput = "<textarea class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" rows=\"5\" "+divHidden+"></textarea>"+inputPNode;
                else
                    temInput = "<input class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\" placeholder=\"请输入信息\" "+divHidden+"/>"+inputPNode;
                temTwo = temTwo + "\r\n                                "+temInput;
                temTwo = temTwo + "\r\n                            </div>";
                temTwo = temTwo + "\r\n                        </div>";
                
                //每行放2列
            	if(bColTwo){
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) > 100){
                		temResult = temResult + "\r\n                    </div>";
            			temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		}
            		temResult = temResult + temTwo;
            		temResult = temResult + "\r\n                    </div>";
            		bColTwo = false;
            	}
            	else{
            		temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;

            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100)
            			bColTwo = true;
            		else
                		temResult = temResult + "\r\n                    </div>";
            	}
            }
            else if(java.util.Objects.equals(COLUMN_TYPE,"3")){
            	if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100){
	                temTwo =  		  "\r\n                        <div class=\"col-sm-6\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
            	}
            	else{
	                temTwo =  		  "\r\n                        <div class=\"col-sm-12\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-2 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-10\">";
            	}
            	
                //查找框
                if(!java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	JSONArray jsoCOLUMN_FIND_RETURN = new JSONArray(COLUMN_FIND_RETURN);
                	if(!java.util.Objects.equals(jsoCOLUMN_FIND_RETURN.getString(0),jsoCOLUMN_FIND_RETURN.getString(1))){
	                	temInput = "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" id=\""+this.attRBC+"_find_"+key+"_cn_name\" name=\""+this.attRBC+"_find_"+key+"_cn_name\" type=\"text\" readonly=\"true\">";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+this.attRBC+"_find_"+key+"_cn_name\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                    <input name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"-1\" type=\"text\" style=\"display:none\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                	else{
	                	temInput = "\r\n                                 <span type=\"find\">";
	                    temInput = temInput + "\r\n                                    <input class=\"form-control form-search\" name=\""+this.attRBC+"_"+key+"\" id=\""+this.attRBC+"_"+key+"\" value=\"\" type=\"text\" >";
	                    temInput = temInput + "\r\n                                </span>";
	                    temInput = temInput + "\r\n                                <span>";
	                    temInput = temInput + "\r\n                                    <img src=\"img/search.png\" id=\""+this.attRBC+"_Ope_"+key+"\" onclick=\""+this.attRBC+"_"+key+"_cn_name_fun()\">";
	                    temInput = temInput + "\r\n                                    <img src=\"img/error.png\" id=\""+this.attRBC+"_Clear_"+key+"\" onclick=\""+this.attRBC+"_clear_input_cn_name(\'"+key+"\',\'"+key+"\')\">";
	                    temInput = temInput + "\r\n                                 </span>";
                	}
                }
                //下拉框
                else if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,"") 
                	&& java.util.Objects.equals(COLUMN_FIND_HTML,"")){
                	temInput = "<select class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" placeholder=\"请输入信息\"></select>"; 
                }
                //输入框
                else if(!java.util.Objects.equals(COLUMN_LENGTH,"") 
                		&& Integer.valueOf(COLUMN_LENGTH)>= 500)
                    temInput = "<textarea class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" rows=\"5\" "+divHidden+"></textarea>"+inputPNode;
                else
                    temInput = "<input class=\"form-control\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\" placeholder=\"请输入信息\" "+divHidden+"/>"+inputPNode;
                temTwo = temTwo + "\r\n                                "+temInput;
                temTwo = temTwo + "\r\n                            </div>";
                temTwo = temTwo + "\r\n                        </div>";

                //每行放2列
            	if(bColTwo){
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) > 100)
            			temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		temResult = temResult + "\r\n                    </div>";
            		bColTwo = false;
            	}
            	else{
            		temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100)
            			bColTwo = true;
            		else
                		temResult = temResult + "\r\n                    </div>";
            	}
            }
            //时间格式
        	else if(java.util.Objects.equals(COLUMN_TYPE,"4"))
        	{
        		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) <= 100){
	                temTwo =  		  "\r\n                        <div class=\"col-sm-6\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
	                temTwo = temTwo + "\r\n                                <input class=\"form-control datetimePicker\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\"  placeholder=\"请设置时间格式\"/>";
	                temTwo = temTwo + "\r\n                            </div>";
	                temTwo = temTwo + "\r\n                        </div>";
            	}
            	else{
	                temTwo =  		  "\r\n                        <div class=\"col-sm-6\">";
	                temTwo = temTwo + "\r\n                            <label for=\""+this.attRBC+"_"+key+"\" class=\"col-sm-4 control-label\">"+temValue+":*</label>"; 
	                temTwo = temTwo + "\r\n                            <div class=\"col-sm-8\">";
	                temTwo = temTwo + "\r\n                                <input class=\"form-control datetimePicker\" id=\""+this.attRBC+"_"+key+"\" name=\""+this.attRBC+"_"+key+"\" type=\"text\"  placeholder=\"请设置时间格式\"/>";
	                temTwo = temTwo + "\r\n                            </div>";
	                temTwo = temTwo + "\r\n                        </div>";
            	}

                //每行放2列
            	if(bColTwo){
            		if(!java.util.Objects.equals(COLUMN_LENGTH,"") && Integer.valueOf(COLUMN_LENGTH) > 100)
            			temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		temResult = temResult + "\r\n                    </div>";
            		bColTwo = false;
            	}
            	else{
            		temResult = temResult + "\r\n                    <div class=\"col-sm-12 form-group\">";
            		temResult = temResult + temTwo;
            		bColTwo = true;
            	}
            }
        }
        if(bColTwo){
            temResult = temResult + "\r\n                    </div>";
            bColTwo = false;
    	}
        temResult = temResult + "\r\n";
        return temResult;
    }
        		
    private StringBuilder WriteBizHtml_2(String templatePath,String tempTargetPath,String temTABLE_NAME){
    	StringBuilder strResult = new StringBuilder();
		FileInputStream fr = null;
		InputStreamReader is = null;
		BufferedReader br = null;
//		FileWriter sw = null; 
		PrintWriter sw = null;
		File readFile = null;
		File writeFile = null;         
		try
		{
			readFile = new File(templatePath+Com_Para.zxyPath+"template_table3_$.vue");
			if(!readFile.exists())
			{
				strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("template_table3_$.vue模板文件不存在")+ "\"}]}");
				return strResult;
			}
			writeFile = new File(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.vue");
			if(writeFile.exists())
			{
                strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode(temTABLE_NAME+"_$.vue文件已存在")+ "\"}]}");
                return strResult;
			}
			fr = new FileInputStream(templatePath+Com_Para.zxyPath+"template_table3_$.vue");
			is = new InputStreamReader(fr,Com_Para.U_CODE);
			br = new BufferedReader(is);
//			sw = new FileWriter(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.vue",true);
			sw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+"_$.vue",true),Com_Para.U_CODE)));
			int k = 0;
			while(true)
			{
				String temLines = br.readLine();
				if(java.util.Objects.equals(temLines,null))
					break;
                if(!java.util.Objects.equals(this.param_value3,""))
                    temLines = temLines.replace("{template_table_CN}",this.param_value3).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC);
                temLines = temLines.replace("{template_table_EN}",temTABLE_NAME).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC);
                //#整行读取数据
                if(k != 0)
                	sw.write("\r\n");
                k ++;
                sw.write(temLines);
                if(temLines.indexOf("<!-- form column begin -->") != -1)
                    //#编辑页面表单标签
                	sw.write(this.AppendEditFormHtml());
			}
		}
		catch(Exception e)
		{
			strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("异常信息"+e.getMessage())+ "\"}]}");
			Com_Fun.debug_in(e,this.toString());
		}
		finally
		{
			try
			{
				if(!java.util.Objects.equals(is,null))
					is.close();
				if(!java.util.Objects.equals(br,null))
					br.close();
				if(!java.util.Objects.equals(fr,null))
					fr.close();
				if(!java.util.Objects.equals(sw,null))
					sw.close();
			}
			catch(Exception ex)
			{
			}
		}
		return strResult;
    }
    
    //#生成业务web html
    private StringBuilder WriteBizHtml_1(String templatePath,String tempTargetPath,String temTABLE_NAME){
    	StringBuilder strResult = new StringBuilder();
    	FileInputStream fr = null;
    	InputStreamReader is = null;
		BufferedReader br = null; 
		File readFile = null;
		File writeFile = null; 
		PrintWriter sw = null;
		try
		{
			String tempN = "template_table3.vue";
			if((this.t_single_expand.length() > 0 && java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"1"))|| this.t_find_expand.length() > 0)
				tempN = "template_table3_tree.vue";
			readFile = new File(templatePath+Com_Para.zxyPath+tempN);
			if(!readFile.exists())
			{
				strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("template_table3.vue模板文件不存在")+ "\"}]}");
				return strResult;
			}
			writeFile = new File(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+".vue");
			if(writeFile.exists())
			{
                strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode(temTABLE_NAME+".vue文件已存在")+ "\"}]}");
                return strResult;
			}
			fr = new FileInputStream(templatePath+Com_Para.zxyPath+tempN);
			is = new InputStreamReader(fr,Com_Para.U_CODE);
			br = new BufferedReader(is);	
			sw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempTargetPath+Com_Para.zxyPath+temTABLE_NAME+".vue",true),Com_Para.U_CODE)));
			int k = 0;
			while(true)
			{
				String temLines = br.readLine();
				if(java.util.Objects.equals(temLines,null))
					break;
                if(!java.util.Objects.equals(this.param_value3,""))
                    temLines = temLines.replace("{template_table_CN}",this.param_value3).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC);
                temLines = temLines.replace("{template_table_EN}",temTABLE_NAME).replace("{$RDA$}",this.attRDA).replace("{$RBC$}",this.attRBC);
                //#整行读取数据
                if(k != 0)
                	sw.write("\r\n");
                k ++;
                sw.write(temLines);
                if(temLines.indexOf("<!-- query conditions begin -->") != -1
                	&& (this.t_single_expand.length() == 0 || java.util.Objects.equals(this.t_single_expand.getString("IS_TREE"),"0"))){
                    //#查询条件html标签
                	sw.write(this.AppendQryCondHtml());
                    //#查询条件查找框 html标签
                	sw.write(this.AppendFindCondHtml());
                }
                else if(temLines.indexOf("<!-- Html Main Sub Table begin -->") != -1)
                    //#主从表设置
                	sw.write(this.AppendHMSTHtml());
                else if(temLines.indexOf("<!-- table up button add begin -->") != -1){
                	//#页面按钮添加，表格上部
                	sw.write(this.AppenTUBAB());
                }
                else if(temLines.indexOf("<!-- table bottom button add begin -->") != -1){
                	//#页面按钮添加，表格底部
                	sw.write(this.AppenTBBAB());                	
                }
			}
            this.UpdRandom(temTABLE_NAME);
		}
		catch(Exception e)
		{
			strResult.append("{\""+ this.param_name+ "\":[{\""+Com_Fun.getLowUpp("s_result")+"\":\"0\",\""+Com_Fun.getLowUpp("error_desc")+"\":\""+Com_Fun.s_decode("异常信息"+e.getMessage())+ "\"}]}");
			Com_Fun.debug_in(e,this.toString());
		}
		finally
		{
			try
			{
				if(!java.util.Objects.equals(is,null))
					is.close();
				if(!java.util.Objects.equals(br,null))
					br.close();
				if(!java.util.Objects.equals(fr,null))
					fr.close();
				if(!java.util.Objects.equals(sw,null))
					sw.close();
			}
			catch(Exception ex)
			{
			}
		}
		return strResult;
    }
    
    //#页面按钮添加，表格底部
    //<!-- table bottom button add begin -->
    private String AppenTBBAB() throws JSONException{
    	String temResult = "\r\n";
    	for(int i = 0; i < this.t_btn_expand.length(); i ++){
    		JSONObject jsobtn = this.t_btn_expand.getJSONObject(i);
    		if(java.util.Objects.equals(jsobtn.getString("BTN_POS"),"1")){
	    		String temBtn = "<button id=\""+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"\" class=\"btn btn-success\" type=\"\">"
	    				+"<strong><i class=\"fa fa-plus\"></i>"+jsobtn.getString("BTN_CN_NAME")+"</strong></button>";
				temResult += "\r\n										"+temBtn;
    		}
    	}
    	return temResult;
    }
    
    //#表格上部按钮
    //<!-- table up button add begin -->
    private String AppenTUBAB() throws JSONException{
    	String temResult = "\r\n";
    	for(int i = 0; i < this.t_btn_expand.length(); i ++){
    		JSONObject jsobtn = this.t_btn_expand.getJSONObject(i);
    		if(java.util.Objects.equals(jsobtn.getString("BTN_POS"),"0")){
	    		String temBtn = "<button id=\""+this.attRDA+"_"+jsobtn.getString("BTN_EN_NAME")+"\" class=\"btn btn-success\" type=\"\">"
	    				+"<strong><i class=\"fa fa-plus\"></i>"+jsobtn.getString("BTN_CN_NAME")+"</strong></button>";
				temResult += "\r\n										"+temBtn;
    		}
    	}
    	return temResult;
    }
    
    //#修改对应的菜单信息中随机码
    private void UpdRandom(String temTABLE_NAME){
    	Db_Common1 temDb_dbc = new Db_Common1();
        StringBuilder temStrSql = new StringBuilder();
        temStrSql.append("update menu_info set S_DESC = '"+this.attRDA
        		+"' where menu_url = '"+this.attFFD+"/"+temTABLE_NAME+".vue'");
        temDb_dbc.CommonExec_Sql(temStrSql);
    }
        
    //#主从表设置html标签
    private String AppendHMSTHtml() throws JSONException{
        String temResult = "";
        if(this.temMainSub.length() > 0){            
            temResult = temResult + "\r\n<div class=\"col-sm-12\" id=\""+this.attRDA+"_TAB_MAIN\">";
            temResult = temResult + "\r\n    <div class=\"wrapper animated fadeInRight\">";
            temResult = temResult + "\r\n        <div class=\"row row-lg\">";
            temResult = temResult + "\r\n            <div class=\"col-sm-12\">"; 
            temResult = temResult + "\r\n                <div class=\"example-wrap\">"; 
            temResult = temResult + "\r\n                    <div class=\"clients-list\">";
            temResult = temResult + "\r\n                        <ul class=\"nav nav-tabs\">";
            for(int temiIndex = 1; temiIndex <= this.temMainSub.length(); temiIndex ++){
            	JSONObject vms = this.temMainSub.getJSONObject(temiIndex - 1);
                String temActive = "";
                if(temiIndex == 1)
                    temActive = "active";
                temResult = temResult + "\r\n                            <li class=\""+temActive+"\" id=\""+this.attRDA+"_tab_"+String.valueOf(temiIndex)+"\"><a data-toggle=\"tab\" href=\"#"+this.attRDA+"_tab-"+String.valueOf(temiIndex)+"\"><i class=\"fa fa-bar-chart-o\"></i>"+vms.getString("SUB_TABLE_CN_NAME")+"</a></li>"; 
            }
            temResult = temResult + "\r\n                        </ul>";
            temResult = temResult + "\r\n                    </div>";
            temResult = temResult + "\r\n                </div>";
            temResult = temResult + "\r\n            </div>";
            temResult = temResult + "\r\n        </div>";
            temResult = temResult + "\r\n    </div>";
            temResult = temResult + "\r\n</div>";
        }
        return temResult;
    }
        		
    //#查询条件查找框 html标签
    private String AppendFindCondHtml() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_FIND_HTML,"") && !java.util.Objects.equals(COLUMN_QRY,"0")){
	            temResult = temResult + "\r\n                                            <span type=\"find\">";
	            temResult = temResult + "\r\n                                                <label for=\""+this.attRDA+"_find_"+key+"\" class=\"control-label\">"+COLUMN_CN_NAME+"</label>";
	            temResult = temResult + "\r\n                                                <input class=\"form-control\" id=\""+this.attRDA+"_find_"+key+"_cn_name\" type=\"text\" name=\""+this.attRDA+"_find_"+key+"_cn_name\" readonly=\"true\">";
	            temResult = temResult + "\r\n                                                <img src=\"img/search.png\" id=\""+this.attRDA+"_Ope_"+key+"\" onclick=\""+this.attRDA+"_"+key+"_cn_name_fun()\">";
	            temResult = temResult + "\r\n                                                <img src=\"img/error.png\" id=\""+this.attRDA+"_Clear_"+key+"\" onclick=\""+this.attRDA+"_clear_input_cn_name(\'"+this.attRDA+"_find_"+key+"_cn_name\',\'"+this.attRDA+"_find_"+key+"\')\">";
	            temResult = temResult + "\r\n                                                <input name=\""+this.attRDA+"_find_"+key+"\" id=\""+this.attRDA+"_find_"+key+"\" type=\"text\" value=\"-1\" style=\"display:none\">";
	            temResult = temResult + "\r\n                                            </span>";
	            temResult = temResult + "\r\n";
        	}
        }
        return temResult;
    }
        		
    //#查询条件html标签输入框或下拉框
    private String AppendQryCondHtml() throws JSONException{
        String temResult = "";
        Iterator iter1 = this.temAtts.keys();
        while (iter1.hasNext()){
			String key = (String) iter1.next();
        	JSONObject jsoColumn = this.temAtts.getJSONObject(key);
        	String COLUMN_QRY_FORMAT = jsoColumn.getString("COLUMN_QRY_FORMAT");
        	String COLUMN_FIND_RETURN = jsoColumn.getString("COLUMN_FIND_RETURN");
        	String COLUMN_FIND_HTML = jsoColumn.getString("COLUMN_FIND_HTML");
        	String COLUMN_TYPE = jsoColumn.getString("COLUMN_TYPE");
        	String COLUMN_QRY = jsoColumn.getString("COLUMN_QRY");
        	String COLUMN_LENGTH = jsoColumn.getString("COLUMN_LENGTH");
        	String COLUMN_CN_NAME = jsoColumn.getString("COLUMN_CN_NAME");
        	if(!java.util.Objects.equals(COLUMN_QRY,"0")){
	        	String temInput = "";
	        	String temValue = COLUMN_CN_NAME;
	        	if(java.util.Objects.equals(COLUMN_TYPE,"1") && java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	                temResult = temResult + "\r\n                                            <label for=\""+this.attRDA+"_qry_"+key+"\" class=\"control-label\">"+temValue+":</label>";
	                if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,""))
	                	temInput = "<select class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" placeholder=\"请输入信息\"></select>"; 
	                else
	                	temInput = "<input class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" class=\"form-control\" placeholder=\"请输入信息\">";
	                temResult = temResult + "\r\n                                            "+temInput;
	            }
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"2") && java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	                temResult = temResult + "\r\n                                            <label for=\""+this.attRDA+"_qry_"+key+"\" class=\"control-label\">"+temValue+":</label>";
	                if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,""))
	                    temInput = "<select class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" placeholder=\"请输入整数\"></select>"; 
	                else
	                	temInput = "<input class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" class=\"form-control\" placeholder=\"请输入整数\">";
	                temResult = temResult + "\r\n                                            "+temInput;
	            }
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"3") && java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	                temResult = temResult + "\r\n                                            <label for=\"qry_"+key+"\" class=\"control-label\">"+temValue+":</label>";
	                if(!java.util.Objects.equals(COLUMN_QRY_FORMAT,""))
	                    temInput = "<select class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" placeholder=\"请输入小数\"></select>"; 
	                else
	                	temInput = "<input class=\"form-control\" id=\""+this.attRDA+"_qry_"+key+"\" name=\""+this.attRDA+"_qry_"+key+"\" class=\"form-control\" placeholder=\"请输入小数\">";
	                temResult = temResult + "\r\n                                            "+temInput;
	            } 
	        	else if(java.util.Objects.equals(COLUMN_TYPE,"4") && java.util.Objects.equals(COLUMN_FIND_HTML,"")){
	                temResult = temResult + "\r\n                                            <label for=\""+this.attRDA+"_qry_begin_"+key+"\" class=\"control-label\">"+temValue+"开始时间:</label>";
	                temResult = temResult + "\r\n                                            <input id=\""+this.attRDA+"_qry_begin_"+key+"\" name=\""+this.attRDA+"_qry_begin_"+key+"\" class=\"form-control datetimePicker\" placeholder=\"请选择开始时间\">";
	                temResult = temResult + "\r\n                                            <label for=\""+this.attRDA+"_qry_end_"+key+"\" class=\"control-label\">"+temValue+"结束时间:</label>";
	                temResult = temResult + "\r\n                                            <input id=\""+this.attRDA+"_qry_end_"+key+"\" name=\""+this.attRDA+"_qry_end_"+key+"\" class=\"form-control datetimePicker\" placeholder=\"请选择结束时间\">";
	           } 
        	}
        }
        return temResult;
    }
    
    //获取绝对跳转页面的随机码
 	private String GetRandomAbs(String temTABLE_NAME)
 	{
 		String temResult = "XXXXXX";
 		ResultSet rs = null;
 		Db_Common1 dbc1 = null;
 		StringBuilder strSql = new StringBuilder();
 		try
 		{
 			dbc1 = new Db_Common1();
 			if(temTABLE_NAME.lastIndexOf(".vue") == -1)
 				strSql.append("select S_DESC from menu_info where menu_url = '"
 						+  temTABLE_NAME + ".vue'");
 			else if(temTABLE_NAME.indexOf("/") == -1)
 				strSql.append("select S_DESC from menu_info where menu_url like '%"
 						+  temTABLE_NAME + "'");
 			else if(temTABLE_NAME.lastIndexOf(".vue") == temTABLE_NAME.length() - 4)
 				strSql.append("select S_DESC from menu_info where menu_url = '"
 						+  temTABLE_NAME + "'");
 			rs = dbc1.Common_Sql(strSql);
 			while(rs.next())
 			{
 				temResult = rs.getString("S_DESC");
 				break;
 			}
 		}
 		catch(Exception e)
 		{
 			Com_Fun.debug_in(e,this.toString(),strSql.toString());
 		}
 		finally
 		{
 			try
 			{
 				if(rs != null)
 				{
 					rs.getStatement().close();
 					rs.close();
 				}
 			}
 			catch(SQLException e)
 			{
 			}
 		}
 		return temResult;
 	}
 	
	// 获取对应页面的随机码
	private String GetRandom(String temTABLE_NAME)
	{
		String temResult = "XXXXXX";
		ResultSet rs = null;
		Db_Common1 dbc1 = null;
		StringBuilder strSql = new StringBuilder();
		try
		{
			dbc1 = new Db_Common1();
			if(temTABLE_NAME.lastIndexOf(".vue") == -1)
				strSql.append("select S_DESC from menu_info where menu_url = '"
						+ this.attFFD + "/" + temTABLE_NAME + ".vue'");
			else if(temTABLE_NAME.lastIndexOf(".vue") == temTABLE_NAME.length() - 4)
				if(temTABLE_NAME.indexOf(this.attFFD) == 0)
					strSql.append("select S_DESC from menu_info where menu_url = '"
							+ temTABLE_NAME + "'");
				else if(temTABLE_NAME.indexOf("/") != -1)
					strSql.append("select S_DESC from menu_info where menu_url = '"
							+ temTABLE_NAME + "'");
				else
					strSql.append("select S_DESC from menu_info where menu_url = '"
							+ this.attFFD + "/" + temTABLE_NAME + "'");
			rs = dbc1.Common_Sql(strSql);
			while(rs.next())
			{
				temResult = rs.getString("S_DESC");
				break;
			}
		}
		catch(Exception e)
		{
			Com_Fun.debug_in(e,this.toString(),strSql.toString());
		}
		finally
		{
			try
			{
				if(rs != null)
				{
					rs.getStatement().close();
					rs.close();
				}
			}
			catch(SQLException e)
			{
			}
		}
		return temResult;
	}

	/**
	 * @return strResult
	 */
	public StringBuilder getStrResult()
	{
		return strResult;
	}

	/**
	 * @param strResult
	 *            要设置的 strResult
	 */
	public void setStrResult(StringBuilder strResult)
	{
		this.strResult = strResult;
	}

	/**
	 * @return user_main_id
	 */
	public String getUser_main_id()
	{
		return user_main_id;
	}

	/**
	 * @param user_main_id
	 *            要设置的 user_main_id
	 */
	public void setUser_main_id(String user_main_id)
	{
		this.user_main_id = user_main_id;
	}

	/**
	 * @return session_id
	 */
	public String getSession_id()
	{
		return session_id;
	}

	/**
	 * @param session_id
	 *            要设置的 session_id
	 */
	public void setSession_id(String session_id)
	{
		this.session_id = session_id;
	}

	/**
	 * @return param_name
	 */
	public String getParam_name()
	{
		return param_name;
	}

	/**
	 * @param param_name
	 *            要设置的 param_name
	 */
	public void setParam_name(String param_name)
	{
		this.param_name = param_name;
	}

	/**
	 * @return param_value1
	 */
	public String getParam_value1()
	{
		return param_value1;
	}

	/**
	 * @param param_value1
	 *            要设置的 param_value1
	 */
	public void setParam_value1(String param_value1)
	{
		this.param_value1 = param_value1;
	}

	/**
	 * @return param_value2
	 */
	public String getParam_value2()
	{
		return param_value2;
	}

	/**
	 * @param param_value2
	 *            要设置的 param_value2
	 */
	public void setParam_value2(String param_value2)
	{
		this.param_value2 = param_value2;
	}

	/**
	 * @return param_value3
	 */
	public String getParam_value3()
	{
		return param_value3;
	}

	/**
	 * @param param_value3
	 *            要设置的 param_value3
	 */
	public void setParam_value3(String param_value3)
	{
		this.param_value3 = param_value3;
	}

	/**
	 * @return param_value4
	 */
	public String getParam_value4()
	{
		return param_value4;
	}

	/**
	 * @param param_value4
	 *            要设置的 param_value4
	 */
	public void setParam_value4(String param_value4)
	{
		this.param_value4 = param_value4;
	}

	/**
	 * @return param_value5
	 */
	public String getParam_value5()
	{
		return param_value5;
	}

	/**
	 * @param param_value5
	 *            要设置的 param_value5
	 */
	public void setParam_value5(String param_value5)
	{
		this.param_value5 = param_value5;
	}

	/**
	 * @return param_value6
	 */
	public String getParam_value6()
	{
		return param_value6;
	}

	/**
	 * @param param_value6
	 *            要设置的 param_value6
	 */
	public void setParam_value6(String param_value6)
	{
		this.param_value6 = param_value6;
	}

	/**
	 * @return param_value7
	 */
	public String getParam_value7()
	{
		return param_value7;
	}

	/**
	 * @param param_value7
	 *            要设置的 param_value7
	 */
	public void setParam_value7(String param_value7)
	{
		this.param_value7 = param_value7;
	}

	/**
	 * @return param_value8
	 */
	public String getParam_value8()
	{
		return param_value8;
	}

	/**
	 * @param param_value8
	 *            要设置的 param_value8
	 */
	public void setParam_value8(String param_value8)
	{
		this.param_value8 = param_value8;
	}

	/**
	 * @return param_value9
	 */
	public String getParam_value9()
	{
		return param_value9;
	}

	/**
	 * @param param_value9
	 *            要设置的 param_value9
	 */
	public void setParam_value9(String param_value9)
	{
		this.param_value9 = param_value9;
	}

	/**
	 * @return param_value10
	 */
	public String getParam_value10()
	{
		return param_value10;
	}

	/**
	 * @param param_value10
	 *            要设置的 param_value10
	 */
	public void setParam_value10(String param_value10)
	{
		this.param_value10 = param_value10;
	}
}